From 250b8eb652a57dcbdff4af7b6efb9c2554b45798 Mon Sep 17 00:00:00 2001 From: x12xx12x <44411062+12xx12@users.noreply.github.com> Date: Fri, 26 Nov 2021 00:51:47 +0100 Subject: Fixed Compiler Warnings --- src/LoggerSimple.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/LoggerSimple.h') diff --git a/src/LoggerSimple.h b/src/LoggerSimple.h index 7c984d2ca..37ed36bc6 100644 --- a/src/LoggerSimple.h +++ b/src/LoggerSimple.h @@ -94,3 +94,12 @@ void LOGERROR(std::string_view a_Format, const Args & ... args) #endif // !NDEBUG #define FLOGWARN FLOGWARNING + +// Conditionally log a warning +#define CONDWARNING(ShouldLog, ...) \ + do { \ + if (ShouldLog) \ + { \ + LOGWARNING(__VA_ARGS__); \ + } \ + } while (false) -- cgit v1.2.3