Jelajahi Sumber

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.
Brian Gianforcaro 4 tahun lalu
induk
melakukan
1498dcd9e1
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      Userland/DynamicLoader/main.cpp

+ 1 - 1
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