Fix empty log lines (#825)

This commit is contained in:
Alex Kremer
2023-08-16 22:57:52 +01:00
committed by GitHub
parent bf3b24867c
commit 435d56e7c5

View File

@@ -90,13 +90,15 @@ using SourceLocationType = SourceLocation;
/**
* @brief Skips evaluation of expensive argument lists if the given logger is disabled for the required severity level.
*
* Note: Currently this introduces potential shadowing (unlikely).
*/
#define LOG(x) \
if (!x) \
{ \
} \
else \
x
#define LOG(x) \
if (auto clio_pump__ = x; not clio_pump__) \
{ \
} \
else \
clio_pump__
/**
* @brief Custom severity levels for @ref util::Logger.