diff options
author | Idan Horowitz <idan.horowitz@gmail.com> | 2022-04-01 20:58:27 +0300 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-04-01 21:24:45 +0100 |
commit | 086969277e74d8ba065bf8145d3aeb0dec0bfee5 (patch) | |
tree | 02b3699a66735ef806d9b46353491f18f8e4e7b4 /Userland/DevTools/HackStudio/Editor.cpp | |
parent | 0376c127f6e98e03607700d0b3f5154b7014b2f8 (diff) | |
download | serenity-086969277e74d8ba065bf8145d3aeb0dec0bfee5.zip |
Everywhere: Run clang-format
Diffstat (limited to 'Userland/DevTools/HackStudio/Editor.cpp')
-rw-r--r-- | Userland/DevTools/HackStudio/Editor.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/Userland/DevTools/HackStudio/Editor.cpp b/Userland/DevTools/HackStudio/Editor.cpp index f452428e5b..d50d92247b 100644 --- a/Userland/DevTools/HackStudio/Editor.cpp +++ b/Userland/DevTools/HackStudio/Editor.cpp @@ -101,9 +101,9 @@ EditorWrapper& Editor::wrapper() { return static_cast<EditorWrapper&>(*parent()); } -const EditorWrapper& Editor::wrapper() const +EditorWrapper const& Editor::wrapper() const { - return static_cast<const EditorWrapper&>(*parent()); + return static_cast<EditorWrapper const&>(*parent()); } void Editor::focusin_event(GUI::FocusEvent& event) @@ -147,11 +147,11 @@ void Editor::paint_event(GUI::PaintEvent& event) if (line < first_visible_line || line > last_visible_line) { continue; } - const auto& icon = breakpoint_icon_bitmap(); + auto const& icon = breakpoint_icon_bitmap(); painter.blit(gutter_icon_rect(line).top_left(), icon, icon.rect()); } if (execution_position().has_value()) { - const auto& icon = current_position_icon_bitmap(); + auto const& icon = current_position_icon_bitmap(); painter.blit(gutter_icon_rect(execution_position().value()).top_left(), icon, icon.rect()); } @@ -198,7 +198,7 @@ static HashMap<String, String>& man_paths() return paths; } -void Editor::show_documentation_tooltip_if_available(const String& hovered_token, const Gfx::IntPoint& screen_location) +void Editor::show_documentation_tooltip_if_available(String const& hovered_token, Gfx::IntPoint const& screen_location) { auto it = man_paths().find(hovered_token); if (it == man_paths().end()) { @@ -438,28 +438,28 @@ void Editor::clear_execution_position() update(gutter_icon_rect(previous_position)); } -const Gfx::Bitmap& Editor::breakpoint_icon_bitmap() +Gfx::Bitmap const& Editor::breakpoint_icon_bitmap() { static auto bitmap = Gfx::Bitmap::try_load_from_file("/res/icons/16x16/breakpoint.png").release_value_but_fixme_should_propagate_errors(); return *bitmap; } -const Gfx::Bitmap& Editor::current_position_icon_bitmap() +Gfx::Bitmap const& Editor::current_position_icon_bitmap() { static auto bitmap = Gfx::Bitmap::try_load_from_file("/res/icons/16x16/go-forward.png").release_value_but_fixme_should_propagate_errors(); return *bitmap; } -const CodeDocument& Editor::code_document() const +CodeDocument const& Editor::code_document() const { - const auto& doc = document(); + auto const& doc = document(); VERIFY(doc.is_code_document()); - return static_cast<const CodeDocument&>(doc); + return static_cast<CodeDocument const&>(doc); } CodeDocument& Editor::code_document() { - return const_cast<CodeDocument&>(static_cast<const Editor&>(*this).code_document()); + return const_cast<CodeDocument&>(static_cast<Editor const&>(*this).code_document()); } void Editor::set_document(GUI::TextDocument& doc) @@ -585,7 +585,7 @@ void Editor::on_identifier_click(const GUI::TextDocumentSpan& span) if (!m_language_client) return; - m_language_client->on_declaration_found = [](const String& file, size_t line, size_t column) { + m_language_client->on_declaration_found = [](String const& file, size_t line, size_t column) { HackStudio::open_file(file, line, column); }; m_language_client->search_declaration(code_document().file_path(), span.range.start().line(), span.range.start().column()); @@ -596,7 +596,7 @@ void Editor::set_cursor(const GUI::TextPosition& a_position) TextEditor::set_cursor(a_position); } -void Editor::set_syntax_highlighter_for(const CodeDocument& document) +void Editor::set_syntax_highlighter_for(CodeDocument const& document) { switch (document.language()) { case Language::Cpp: @@ -650,7 +650,7 @@ void Editor::set_autocomplete_provider_for(CodeDocument const& document) } } -void Editor::set_language_client_for(const CodeDocument& document) +void Editor::set_language_client_for(CodeDocument const& document) { if (m_language_client && m_language_client->language() == document.language()) return; |