Update argv.h

This commit is contained in:
Gabi Melman 2020-08-19 23:56:56 +03:00 committed by GitHub
parent 30f738e49a
commit 6587058f74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,7 +21,7 @@ namespace spdlog {
namespace cfg { namespace cfg {
// search for SPDLOG_LEVEL= in the args and use it to init the levels // search for SPDLOG_LEVEL= in the args and use it to init the levels
void load_argv_levels(int argc, const char **argv) inline void load_argv_levels(int argc, const char **argv)
{ {
const std::string spdlog_level_prefix = "SPDLOG_LEVEL="; const std::string spdlog_level_prefix = "SPDLOG_LEVEL=";
for (int i = 1; i < argc; i++) for (int i = 1; i < argc; i++)
@ -36,7 +36,7 @@ void load_argv_levels(int argc, const char **argv)
} }
} }
void load_argv_levels(int argc, char **argv) inline void load_argv_levels(int argc, char **argv)
{ {
load_argv_levels(argc, const_cast<const char **>(argv)); load_argv_levels(argc, const_cast<const char **>(argv));
} }