From 1498dcd9e1c98b73e65dcdbbda8518286386eb31 Mon Sep 17 00:00:00 2001 From: Brian Gianforcaro Date: Thu, 1 Jul 2021 22:27:04 -0700 Subject: [PATCH] DynamicLoader: Use string view literal to remove a allocation on startup The ""sv operator switches a const char* to String conversion into just a StringView literal. --- Userland/DynamicLoader/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/DynamicLoader/main.cpp b/Userland/DynamicLoader/main.cpp index bc18a5f361..0712554cb8 100644 --- a/Userland/DynamicLoader/main.cpp +++ b/Userland/DynamicLoader/main.cpp @@ -103,7 +103,7 @@ void _start(int argc, char** argv, char** envp) } } - if (main_program_name == "/usr/lib/Loader.so") { + if (main_program_name == "/usr/lib/Loader.so"sv) { // We've been invoked directly as an executable rather than as the // ELF interpreter for some other binary. In the future we may want // to support launching a program directly from the dynamic loader