R2DLiu 2021-12-05 18:18:24 -05:00
commit edbebf48b7

View file

@ -80,18 +80,6 @@ enum LOG_LEVELS
static const char LOG_LEVEL_TO_CHAR[7] = "-NEWID";
// Short File code taken from https://blog.galowicz.de/2016/02/20/short_file_macro/
static constexpr const char* past_last_slash(const char* str, const char* last_slash)
{
return *str == '\0' ? last_slash
: *str == '/' || *str == '\\' ? past_last_slash(str + 1, str + 1) : past_last_slash(str + 1, last_slash);
}
static constexpr const char* past_last_slash(const char* str)
{
return past_last_slash(str, str);
}
void GenericLogFmtImpl(LOG_LEVELS level, LOG_TYPE type, const char* file, int line,
fmt::string_view format, const fmt::format_args& args);
@ -126,7 +114,7 @@ void GenericLog(LOG_LEVELS level, LOG_TYPE type, const char* file, int line, con
do \
{ \
if (v <= MAX_LOGLEVEL) \
Common::Log::GenericLog(v, t, Common::Log::past_last_slash(__FILE__), __LINE__, __VA_ARGS__); \
Common::Log::GenericLog(v, t, __FILE__, __LINE__, __VA_ARGS__); \
} while (0)
#define ERROR_LOG(t, ...) \