Replace template function used by many macros

This commit is contained in:
Akkadius 2019-09-07 18:25:40 -05:00
parent cc377f2659
commit ae781ee962

View File

@ -335,6 +335,7 @@ private:
extern EQEmuLogSys LogSys; extern EQEmuLogSys LogSys;
/**
template<typename... Args> template<typename... Args>
void OutF( void OutF(
EQEmuLogSys &ls, EQEmuLogSys &ls,
@ -350,5 +351,11 @@ void OutF(
std::string log_str = fmt::format(fmt, args...); std::string log_str = fmt::format(fmt, args...);
ls.Out(debug_level, log_category, file, func, line, log_str.c_str()); ls.Out(debug_level, log_category, file, func, line, log_str.c_str());
} }
**/
#define OutF(ls, debug_level, log_category, file, func, line, formatStr, ...) \
do { \
ls.Out(debug_level, log_category, file, func, line, fmt::format(formatStr, ##__VA_ARGS__).c_str()); \
} while(0)
#endif #endif