diff options
author | Andreas Kling <kling@serenityos.org> | 2021-02-11 23:52:39 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-02-11 23:52:39 +0100 |
commit | a50ba0a491f23493fe24a365a4e865ee47f84f4b (patch) | |
tree | a78ca4c93f831c1eda2d8018eb53aaf82706e5de /Userland/Libraries | |
parent | cf1c159ed541222aeeb03d249f1e64ef0650b2df (diff) | |
download | serenity-a50ba0a491f23493fe24a365a4e865ee47f84f4b.zip |
LibSyntax: Make rehighlight() take Gfx::Palette as by const-reference
Diffstat (limited to 'Userland/Libraries')
-rw-r--r-- | Userland/Libraries/LibCpp/SyntaxHighlighter.cpp | 2 | ||||
-rw-r--r-- | Userland/Libraries/LibCpp/SyntaxHighlighter.h | 2 | ||||
-rw-r--r-- | Userland/Libraries/LibGUI/GMLSyntaxHighlighter.cpp | 2 | ||||
-rw-r--r-- | Userland/Libraries/LibGUI/GMLSyntaxHighlighter.h | 2 | ||||
-rw-r--r-- | Userland/Libraries/LibGUI/INISyntaxHighlighter.cpp | 2 | ||||
-rw-r--r-- | Userland/Libraries/LibGUI/INISyntaxHighlighter.h | 2 | ||||
-rw-r--r-- | Userland/Libraries/LibJS/SyntaxHighlighter.cpp | 2 | ||||
-rw-r--r-- | Userland/Libraries/LibJS/SyntaxHighlighter.h | 2 | ||||
-rw-r--r-- | Userland/Libraries/LibSyntax/Highlighter.h | 2 |
9 files changed, 9 insertions, 9 deletions
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<MatchingTokenPair> 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<MatchingTokenPair> 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<MatchingTokenPair> 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<MatchingTokenPair> 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; }; |