diff options
| author | Egor Tensin <egor@tensin.name> | 2026-06-04 16:39:58 +0200 |
|---|---|---|
| committer | Egor Tensin <egor@tensin.name> | 2026-06-04 16:41:09 +0200 |
| commit | c547aac3154962508fed5829d4c166394f2c168b (patch) | |
| tree | 61338991c93dded56dfede2a983d4cefebc64d18 /server/lexer/input.hpp | |
| parent | adjust the formatting a little bit (diff) | |
| download | math-server-c547aac3154962508fed5829d4c166394f2c168b.tar.gz math-server-c547aac3154962508fed5829d4c166394f2c168b.zip | |
fix std::string_view usage
Diffstat (limited to 'server/lexer/input.hpp')
| -rw-r--r-- | server/lexer/input.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/lexer/input.hpp b/server/lexer/input.hpp index 0e28b13..1f3b749 100644 --- a/server/lexer/input.hpp +++ b/server/lexer/input.hpp @@ -14,9 +14,9 @@ namespace math::server::lexer { class Input { public: - explicit Input(const std::string_view& input) : m_pos{0}, m_input{input} {} + explicit Input(std::string_view input) : m_pos{0}, m_input{input} {} - const std::string_view& get_input() const { + std::string_view get_input() const { return m_input; } @@ -40,7 +40,7 @@ public: m_input.remove_prefix(len); } - void consume(const std::string_view& sub) { + void consume(std::string_view sub) { consume(sub.length()); } |
