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/Token.h | |
parent | ad5d217e760c7fb73ffc0c4c827d767d6be8ec80 (diff) | |
download | serenity-8b1108e4858f797c9216dc8ae4a3918ad50c73b4.zip |
Everywhere: Pass AK::StringView by value
Diffstat (limited to 'Userland/Libraries/LibCpp/Token.h')
-rw-r--r-- | Userland/Libraries/LibCpp/Token.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibCpp/Token.h b/Userland/Libraries/LibCpp/Token.h index 7a2fc919ed..70b4b3cfe0 100644 --- a/Userland/Libraries/LibCpp/Token.h +++ b/Userland/Libraries/LibCpp/Token.h @@ -96,7 +96,7 @@ struct Token { #undef __TOKEN }; - Token(Type type, const Position& start, const Position& end, const StringView& text) + Token(Type type, const Position& start, const Position& end, StringView text) : m_type(type) , m_start(start) , m_end(end) @@ -125,7 +125,7 @@ struct Token { void set_start(const Position& other) { m_start = other; } void set_end(const Position& other) { m_end = other; } Type type() const { return m_type; } - const StringView& text() const { return m_text; } + StringView text() const { return m_text; } private: Type m_type { Type::Unknown }; |