diff options
author | Andreas Kling <kling@serenityos.org> | 2021-11-11 00:55:02 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-11-11 01:27:46 +0100 |
commit | 8b1108e4858f797c9216dc8ae4a3918ad50c73b4 (patch) | |
tree | ca64ba25aa735d25013d76c6d83570496c742014 /Userland/Libraries/LibCpp/Lexer.cpp | |
parent | ad5d217e760c7fb73ffc0c4c827d767d6be8ec80 (diff) | |
download | serenity-8b1108e4858f797c9216dc8ae4a3918ad50c73b4.zip |
Everywhere: Pass AK::StringView by value
Diffstat (limited to 'Userland/Libraries/LibCpp/Lexer.cpp')
-rw-r--r-- | Userland/Libraries/LibCpp/Lexer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibCpp/Lexer.cpp b/Userland/Libraries/LibCpp/Lexer.cpp index 85c61b8c6c..247ce2f667 100644 --- a/Userland/Libraries/LibCpp/Lexer.cpp +++ b/Userland/Libraries/LibCpp/Lexer.cpp @@ -13,7 +13,7 @@ namespace Cpp { -Lexer::Lexer(StringView const& input, size_t start_line) +Lexer::Lexer(StringView input, size_t start_line) : m_input(input) , m_previous_position { start_line, 0 } , m_position { start_line, 0 } @@ -188,7 +188,7 @@ constexpr char const* s_known_types[] = { "wchar_t" }; -static bool is_keyword(StringView const& string) +static bool is_keyword(StringView string) { static HashTable<String> keywords(array_size(s_known_keywords)); if (keywords.is_empty()) { @@ -197,7 +197,7 @@ static bool is_keyword(StringView const& string) return keywords.contains(string); } -static bool is_known_type(StringView const& string) +static bool is_known_type(StringView string) { static HashTable<String> types(array_size(s_known_types)); if (types.is_empty()) { |