2
0
Эх сурвалжийг харах

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
Alexander Wilms 1 жил өмнө
parent
commit
f81a0cb4b6

+ 1 - 2
include/vstd/CLoggerBase.h

@@ -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),	\