From edbebf48b72e5f4df1aafa84f938db0188b2e8dc Mon Sep 17 00:00:00 2001 From: R2DLiu Date: Sun, 5 Dec 2021 18:18:24 -0500 Subject: [PATCH] pull in https://github.com/project-slippi/Ishiiruka/pull/251 --- Source/Core/Common/Logging/Log.h | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/Source/Core/Common/Logging/Log.h b/Source/Core/Common/Logging/Log.h index 1884fb69dd..644371fa78 100644 --- a/Source/Core/Common/Logging/Log.h +++ b/Source/Core/Common/Logging/Log.h @@ -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, ...) \