Fixed multiple clang-tidy warnings

This commit is contained in:
gabime
2020-04-08 17:04:10 +03:00
parent 0c56f98a92
commit c16eb80d7f
6 changed files with 33 additions and 15 deletions

View File

@@ -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