From a50ba0a491f23493fe24a365a4e865ee47f84f4b Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 11 Feb 2021 23:52:39 +0100 Subject: LibSyntax: Make rehighlight() take Gfx::Palette as by const-reference --- Userland/Libraries/LibCpp/SyntaxHighlighter.cpp | 2 +- Userland/Libraries/LibCpp/SyntaxHighlighter.h | 2 +- Userland/Libraries/LibGUI/GMLSyntaxHighlighter.cpp | 2 +- Userland/Libraries/LibGUI/GMLSyntaxHighlighter.h | 2 +- Userland/Libraries/LibGUI/INISyntaxHighlighter.cpp | 2 +- Userland/Libraries/LibGUI/INISyntaxHighlighter.h | 2 +- Userland/Libraries/LibJS/SyntaxHighlighter.cpp | 2 +- Userland/Libraries/LibJS/SyntaxHighlighter.h | 2 +- Userland/Libraries/LibSyntax/Highlighter.h | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) (limited to 'Userland/Libraries') diff --git a/Userland/Libraries/LibCpp/SyntaxHighlighter.cpp b/Userland/Libraries/LibCpp/SyntaxHighlighter.cpp index f1dc044bfe..762257678c 100644 --- a/Userland/Libraries/LibCpp/SyntaxHighlighter.cpp +++ b/Userland/Libraries/LibCpp/SyntaxHighlighter.cpp @@ -75,7 +75,7 @@ bool SyntaxHighlighter::is_navigatable(void* token) const return cpp_token == Cpp::Token::Type::IncludePath; } -void SyntaxHighlighter::rehighlight(Gfx::Palette palette) +void SyntaxHighlighter::rehighlight(const Palette& palette) { auto text = m_client->get_text(); Cpp::Lexer lexer(text); diff --git a/Userland/Libraries/LibCpp/SyntaxHighlighter.h b/Userland/Libraries/LibCpp/SyntaxHighlighter.h index c55ab56b5d..a85c44889e 100644 --- a/Userland/Libraries/LibCpp/SyntaxHighlighter.h +++ b/Userland/Libraries/LibCpp/SyntaxHighlighter.h @@ -39,7 +39,7 @@ public: virtual bool is_navigatable(void*) const override; virtual Syntax::Language language() const override { return Syntax::Language::Cpp; } - virtual void rehighlight(Gfx::Palette) override; + virtual void rehighlight(const Palette&) override; protected: virtual Vector matching_token_pairs() const override; diff --git a/Userland/Libraries/LibGUI/GMLSyntaxHighlighter.cpp b/Userland/Libraries/LibGUI/GMLSyntaxHighlighter.cpp index 593355edd9..1e6869fbe9 100644 --- a/Userland/Libraries/LibGUI/GMLSyntaxHighlighter.cpp +++ b/Userland/Libraries/LibGUI/GMLSyntaxHighlighter.cpp @@ -59,7 +59,7 @@ bool GMLSyntaxHighlighter::is_identifier(void* token) const return ini_token == GUI::GMLToken::Type::Identifier; } -void GMLSyntaxHighlighter::rehighlight(Gfx::Palette palette) +void GMLSyntaxHighlighter::rehighlight(const Palette& palette) { auto text = m_client->get_text(); GMLLexer lexer(text); diff --git a/Userland/Libraries/LibGUI/GMLSyntaxHighlighter.h b/Userland/Libraries/LibGUI/GMLSyntaxHighlighter.h index 4891cce703..97c9e28082 100644 --- a/Userland/Libraries/LibGUI/GMLSyntaxHighlighter.h +++ b/Userland/Libraries/LibGUI/GMLSyntaxHighlighter.h @@ -38,7 +38,7 @@ public: virtual bool is_identifier(void*) const override; virtual Syntax::Language language() const override { return Syntax::Language::GML; } - virtual void rehighlight(Gfx::Palette) override; + virtual void rehighlight(const Palette&) override; protected: virtual Vector matching_token_pairs() const override; diff --git a/Userland/Libraries/LibGUI/INISyntaxHighlighter.cpp b/Userland/Libraries/LibGUI/INISyntaxHighlighter.cpp index 49576dc037..115f79349e 100644 --- a/Userland/Libraries/LibGUI/INISyntaxHighlighter.cpp +++ b/Userland/Libraries/LibGUI/INISyntaxHighlighter.cpp @@ -58,7 +58,7 @@ bool IniSyntaxHighlighter::is_identifier(void* token) const return ini_token == GUI::IniToken::Type::Name; } -void IniSyntaxHighlighter::rehighlight(Gfx::Palette palette) +void IniSyntaxHighlighter::rehighlight(const Palette& palette) { auto text = m_client->get_text(); IniLexer lexer(text); diff --git a/Userland/Libraries/LibGUI/INISyntaxHighlighter.h b/Userland/Libraries/LibGUI/INISyntaxHighlighter.h index e6285c6f54..516b5950be 100644 --- a/Userland/Libraries/LibGUI/INISyntaxHighlighter.h +++ b/Userland/Libraries/LibGUI/INISyntaxHighlighter.h @@ -38,7 +38,7 @@ public: virtual bool is_identifier(void*) const override; virtual Syntax::Language language() const override { return Syntax::Language::INI; } - virtual void rehighlight(Gfx::Palette) override; + virtual void rehighlight(const Palette&) override; protected: virtual Vector matching_token_pairs() const override; diff --git a/Userland/Libraries/LibJS/SyntaxHighlighter.cpp b/Userland/Libraries/LibJS/SyntaxHighlighter.cpp index 757a334994..3bbbfd8f29 100644 --- a/Userland/Libraries/LibJS/SyntaxHighlighter.cpp +++ b/Userland/Libraries/LibJS/SyntaxHighlighter.cpp @@ -69,7 +69,7 @@ bool SyntaxHighlighter::is_navigatable([[maybe_unused]] void* token) const return false; } -void SyntaxHighlighter::rehighlight(Gfx::Palette palette) +void SyntaxHighlighter::rehighlight(const Palette& palette) { auto text = m_client->get_text(); diff --git a/Userland/Libraries/LibJS/SyntaxHighlighter.h b/Userland/Libraries/LibJS/SyntaxHighlighter.h index 1c5bb10c80..76b43d0ef7 100644 --- a/Userland/Libraries/LibJS/SyntaxHighlighter.h +++ b/Userland/Libraries/LibJS/SyntaxHighlighter.h @@ -39,7 +39,7 @@ public: virtual bool is_navigatable(void*) const override; virtual Syntax::Language language() const override { return Syntax::Language::JavaScript; } - virtual void rehighlight(Gfx::Palette) override; + virtual void rehighlight(const Palette&) override; protected: virtual Vector matching_token_pairs() const override; diff --git a/Userland/Libraries/LibSyntax/Highlighter.h b/Userland/Libraries/LibSyntax/Highlighter.h index 4f56fc05d5..deb46e1aa2 100644 --- a/Userland/Libraries/LibSyntax/Highlighter.h +++ b/Userland/Libraries/LibSyntax/Highlighter.h @@ -56,7 +56,7 @@ public: virtual ~Highlighter(); virtual Language language() const = 0; - virtual void rehighlight(Gfx::Palette) = 0; + virtual void rehighlight(const Palette&) = 0; virtual void highlight_matching_token_pair(); virtual bool is_identifier(void*) const { return false; }; -- cgit v1.2.3