1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-26 03:52:01 +02:00

CLoggerBase: Remove semicolon from RAII_TRACE definition

Fixes the following SonarCloud issue:

Modify the macro definition so that it needs to be followed by a semicolon, or remove this empty statement.
Empty statements should be removed cpp:S1116
https://sonarcloud.io/organizations/vcmi/rules?open=cpp%3AS1116&rule_key=cpp%3AS1116
This commit is contained in:
Alexander Wilms 2024-01-13 17:46:21 +00:00
parent 4b8f8d90f6
commit f81a0cb4b6

View File

@ -173,9 +173,8 @@ private:
/// the first statement in the function. Logging traces via this macro have almost no impact when the trace is disabled.
///
#define RAII_TRACE(logger, onEntry, onLeave) \
std::unique_ptr<vstd::CTraceLogger> ctl00; \
if(logger->isTraceEnabled()) \
ctl00 = std::make_unique<vstd::CTraceLogger>(logger, onEntry, onLeave);
std::unique_ptr<vstd::CTraceLogger> ctl00 = std::make_unique<vstd::CTraceLogger>(logger, onEntry, onLeave)
#define LOG_TRACE(logger) RAII_TRACE(logger, \
boost::str(boost::format("Entering %s.") % BOOST_CURRENT_FUNCTION), \