From 484e60f14250ef94495c8158cb1a90c3768f20e8 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sat, 1 Apr 2017 16:46:23 -0400 Subject: [PATCH] Use do-while(0) trick for function like macros --- common/eqemu_logsys.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/eqemu_logsys.h b/common/eqemu_logsys.h index b31deac02..71a270322 100644 --- a/common/eqemu_logsys.h +++ b/common/eqemu_logsys.h @@ -138,10 +138,10 @@ static const char* LogCategoryName[LogCategory::MaxCategoryID] = { }; } -#define Log(debug_level, log_category, message, ...){\ +#define Log(debug_level, log_category, message, ...) do {\ if (LogSys.log_settings[log_category].is_category_enabled == 1)\ LogSys.Out(debug_level, log_category, message, ##__VA_ARGS__);\ -} +} while (0) class EQEmuLogSys { public: