module_util: make GLOBAL_MODULE_NAME constexpr

This allows the compiler to hard-code pointers to the string without
looking up a global variable at runtime.
This commit is contained in:
Max Kellermann 2020-02-04 12:19:24 +01:00
parent f1908b6212
commit 0548e1255f

View file

@ -6,7 +6,7 @@
#include <string>
static const char* GLOBAL_MODULE_NAME = "GLOBAL";
static constexpr const char* GLOBAL_MODULE_NAME = "GLOBAL";
extern std::string extract_module_name(const char* name);
extern std::string extract_var_name(const char* name);