mirror of
https://github.com/Dark98/threeSD.git
synced 2026-07-04 16:49:05 +00:00
Enable C++20 and re-enable MSVC build
Also switched to standard-conforming __VA_OPT__ for logging.
This commit is contained in:
@@ -15,12 +15,11 @@
|
||||
std::uint64_t GetLoggingTime();
|
||||
std::string StandardizeLogClass(const std::string& log_class);
|
||||
|
||||
// TODO: Use a standard variant of ##__VA_ARGS__?
|
||||
#define LOG_PRINT(log_class, level, text_style, file, line, func, format, ...) \
|
||||
{ \
|
||||
fmt::print(stderr, text_style, "[{:12.6f}] {} <{}> {}:{}:{}: " format "\n", \
|
||||
GetLoggingTime() / 1000000.0, StandardizeLogClass(log_class), level, file, \
|
||||
line, func, ##__VA_ARGS__); \
|
||||
line, func __VA_OPT__(, ) __VA_ARGS__); \
|
||||
fflush(stderr); \
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user