mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 23:01:30 +00:00
Use do-while(0) trick for function like macros
This commit is contained in:
parent
de52d2f64a
commit
484e60f142
@ -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)\
|
if (LogSys.log_settings[log_category].is_category_enabled == 1)\
|
||||||
LogSys.Out(debug_level, log_category, message, ##__VA_ARGS__);\
|
LogSys.Out(debug_level, log_category, message, ##__VA_ARGS__);\
|
||||||
}
|
} while (0)
|
||||||
|
|
||||||
class EQEmuLogSys {
|
class EQEmuLogSys {
|
||||||
public:
|
public:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user