From 61bf51874de432856ecd2c5794334bd256d4b014 Mon Sep 17 00:00:00 2001 From: Giacomo Pozzoni Date: Fri, 31 Jul 2020 20:53:13 +0000 Subject: Core/Misc: Fix static analysis issues (#25178) (cherry picked from commit 7cf122fc2a604bae77d0b935536c41ec9203e62d) --- src/common/Logging/Log.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/common/Logging/Log.cpp') diff --git a/src/common/Logging/Log.cpp b/src/common/Logging/Log.cpp index 59baea2c143..6c364105a7b 100644 --- a/src/common/Logging/Log.cpp +++ b/src/common/Logging/Log.cpp @@ -287,12 +287,13 @@ std::string Log::GetTimestampStr() } } -bool Log::SetLogLevel(std::string const& name, char const* newLevelc, bool isLogger /* = true */) +bool Log::SetLogLevel(std::string const& name, int32 newLeveli, bool isLogger /* = true */) { - LogLevel newLevel = LogLevel(atoi(newLevelc)); - if (newLevel < 0) + if (newLeveli < 0) return false; + LogLevel newLevel = LogLevel(newLeveli); + if (isLogger) { auto it = loggers.begin(); -- cgit v1.2.3