1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 00:17:46 +00: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
392 changed files with 978 additions and 978 deletions

View file

@ -96,7 +96,7 @@ PropertyID property_id_from_camel_case_string(StringView string)
return PropertyID::Invalid;
}
PropertyID property_id_from_string(const StringView& string)
PropertyID property_id_from_string(StringView string)
{
)~~~");

View file

@ -102,7 +102,7 @@ enum class PropertyID {
};
PropertyID property_id_from_camel_case_string(StringView);
PropertyID property_id_from_string(const StringView&);
PropertyID property_id_from_string(StringView);
const char* string_from_property_id(PropertyID);
bool is_inherited_property(PropertyID);
NonnullRefPtr<StyleValue> property_initial_value(PropertyID);

View file

@ -49,7 +49,7 @@ int main(int argc, char** argv)
namespace Web::CSS {
ValueID value_id_from_string(const StringView& string)
ValueID value_id_from_string(StringView string)
{
)~~~");

View file

@ -66,7 +66,7 @@ enum class ValueID {
generator.append(R"~~~(
};
ValueID value_id_from_string(const StringView&);
ValueID value_id_from_string(StringView);
const char* string_from_value_id(ValueID);
}

View file

@ -235,7 +235,7 @@ static NonnullOwnPtr<Interface> parse_interface(StringView filename, StringView
}
};
auto assert_string = [&](StringView const& expected) {
auto assert_string = [&](StringView expected) {
if (!lexer.consume_specific(expected))
report_parsing_error(String::formatted("expected '{}'", expected), filename, input, lexer.tell());
};
@ -1267,7 +1267,7 @@ enum class WrappingReference {
Yes,
};
static void generate_wrap_statement(SourceGenerator& generator, String const& value, IDL::Type const& type, StringView const& result_expression, WrappingReference wrapping_reference = WrappingReference::No, size_t recursion_depth = 0)
static void generate_wrap_statement(SourceGenerator& generator, String const& value, IDL::Type const& type, StringView result_expression, WrappingReference wrapping_reference = WrappingReference::No, size_t recursion_depth = 0)
{
auto scoped_generator = generator.fork();
scoped_generator.set("value", value);