1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-10 18:10:56 +09:00

Everywhere: Pass AK::StringView by value

This commit is contained in:
Andreas Kling 2021-11-11 00:55:02 +01:00
parent ad5d217e76
commit 8b1108e485
Notes: sideshowbarker 2024-07-18 01:17:49 +09:00
392 changed files with 978 additions and 978 deletions

View file

@ -12,7 +12,7 @@
#include <ctype.h>
namespace Cpp {
Preprocessor::Preprocessor(const String& filename, const StringView& program)
Preprocessor::Preprocessor(const String& filename, StringView program)
: m_filename(filename)
, m_program(program)
{
@ -86,7 +86,7 @@ static void consume_whitespace(GenericLexer& lexer)
}
}
void Preprocessor::handle_preprocessor_statement(StringView const& line)
void Preprocessor::handle_preprocessor_statement(StringView line)
{
GenericLexer lexer(line);
@ -100,7 +100,7 @@ void Preprocessor::handle_preprocessor_statement(StringView const& line)
handle_preprocessor_keyword(keyword, lexer);
}
void Preprocessor::handle_include_statement(StringView const& include_path)
void Preprocessor::handle_include_statement(StringView include_path)
{
m_included_paths.append(include_path);
if (definitions_in_header_callback) {
@ -109,7 +109,7 @@ void Preprocessor::handle_include_statement(StringView const& include_path)
}
}
void Preprocessor::handle_preprocessor_keyword(const StringView& keyword, GenericLexer& line_lexer)
void Preprocessor::handle_preprocessor_keyword(StringView keyword, GenericLexer& line_lexer)
{
if (keyword == "include") {
// Should have called 'handle_include_statement'.
@ -345,7 +345,7 @@ Optional<Preprocessor::Definition> Preprocessor::create_definition(StringView li
return definition;
}
String Preprocessor::remove_escaped_newlines(StringView const& value)
String Preprocessor::remove_escaped_newlines(StringView value)
{
AK::StringBuilder processed_value;
GenericLexer lexer { value };