diff options
author | gabime <gmelman1@gmail.com> | 2020-04-08 17:04:10 +0300 |
---|---|---|
committer | gabime <gmelman1@gmail.com> | 2020-04-08 17:04:10 +0300 |
commit | c16eb80d7f1208fc6e2e97047efef9b1fbfede6d (patch) | |
tree | dbaae1a8d12ccdb5a607a6a6f21f4b240e70ef71 /include/spdlog/cfg/argv.h | |
parent | 0c56f98a92eae8d9c1ea8a302b537f083fa29c54 (diff) |
Fixed multiple clang-tidy warnings
Diffstat (limited to 'include/spdlog/cfg/argv.h')
-rw-r--r-- | include/spdlog/cfg/argv.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/include/spdlog/cfg/argv.h b/include/spdlog/cfg/argv.h index ea60949c..6d71864e 100644 --- a/include/spdlog/cfg/argv.h +++ b/include/spdlog/cfg/argv.h @@ -21,10 +21,10 @@ namespace spdlog { namespace cfg { // search for SPDLOG_LEVEL= in the args and use it to init the levels -void load_argv_levels(int args, char **argv) +void load_argv_levels(int argc, const char **argv) { const std::string spdlog_level_prefix = "SPDLOG_LEVEL="; - for (int i = 1; i < args; i++) + for (int i = 1; i < argc; i++) { std::string arg = argv[i]; if (arg.find(spdlog_level_prefix) == 0) @@ -36,5 +36,10 @@ void load_argv_levels(int args, char **argv) } } +void load_argv_levels(int argc, char **argv) +{ + load_argv_levels(argc, const_cast<const char**>(argv)); +} + } // namespace cfg } // namespace spdlog |