diff options
author | Idan Horowitz <idan.horowitz@gmail.com> | 2022-01-24 23:25:53 +0200 |
---|---|---|
committer | Ali Mohammad Pur <Ali.mpfard@gmail.com> | 2022-01-25 13:41:09 +0330 |
commit | d49d2c7ec4cbe2c0792cf112055a6f5eca79dd63 (patch) | |
tree | a8754a0c435638bb2df2553b8c40f49780860922 /Userland/Libraries/LibCpp | |
parent | 10b25d2a57702afe9a27b74bec92a0f28de45446 (diff) | |
download | serenity-d49d2c7ec4cbe2c0792cf112055a6f5eca79dd63.zip |
AK: Add a consume_until(StringView) overload to GenericLexer
This allows us to skip a strlen call.
Diffstat (limited to 'Userland/Libraries/LibCpp')
-rw-r--r-- | Userland/Libraries/LibCpp/Preprocessor.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibCpp/Preprocessor.cpp b/Userland/Libraries/LibCpp/Preprocessor.cpp index 9cf3cd82fb..f1ade8f27b 100644 --- a/Userland/Libraries/LibCpp/Preprocessor.cpp +++ b/Userland/Libraries/LibCpp/Preprocessor.cpp @@ -356,7 +356,7 @@ String Preprocessor::remove_escaped_newlines(StringView value) AK::StringBuilder processed_value; GenericLexer lexer { value }; while (!lexer.is_eof()) { - processed_value.append(lexer.consume_until("\\\n")); + processed_value.append(lexer.consume_until("\\\n"sv)); } return processed_value.to_string(); } |