1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:27:44 +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

@ -355,12 +355,12 @@ Vector<CppComprehensionEngine::Symbol> CppComprehensionEngine::get_child_symbols
return symbols;
}
String CppComprehensionEngine::document_path_from_include_path(const StringView& include_path) const
String CppComprehensionEngine::document_path_from_include_path(StringView include_path) const
{
static Regex<PosixExtended> library_include("<(.+)>");
static Regex<PosixExtended> user_defined_include("\"(.+)\"");
auto document_path_for_library_include = [&](const StringView& include_path) -> String {
auto document_path_for_library_include = [&](StringView include_path) -> String {
RegexResult result;
if (!library_include.search(include_path, result))
return {};
@ -369,7 +369,7 @@ String CppComprehensionEngine::document_path_from_include_path(const StringView&
return String::formatted("/usr/include/{}", path);
};
auto document_path_for_user_defined_include = [&](const StringView& include_path) -> String {
auto document_path_for_user_defined_include = [&](StringView include_path) -> String {
RegexResult result;
if (!user_defined_include.search(include_path, result))
return {};