diff options
Diffstat (limited to 'Alc/logging.h')
-rw-r--r-- | Alc/logging.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Alc/logging.h b/Alc/logging.h index ae70e598..6c2c1c94 100644 --- a/Alc/logging.h +++ b/Alc/logging.h @@ -3,6 +3,8 @@ #include <stdio.h> +#include "opthelpers.h" + #if defined(_WIN64) #define SZFMT "%I64u" @@ -46,24 +48,24 @@ enum LogLevel { extern LogLevel gLogLevel; #define TRACEREF(...) do { \ - if(gLogLevel >= LogRef) \ + if(UNLIKELY(gLogLevel >= LogRef)) \ AL_PRINT("(--)", __VA_ARGS__); \ } while(0) #define TRACE(...) do { \ - if(gLogLevel >= LogTrace) \ + if(UNLIKELY(gLogLevel >= LogTrace)) \ AL_PRINT("(II)", __VA_ARGS__); \ LOG_ANDROID(ANDROID_LOG_DEBUG, __VA_ARGS__); \ } while(0) #define WARN(...) do { \ - if(gLogLevel >= LogWarning) \ + if(UNLIKELY(gLogLevel >= LogWarning)) \ AL_PRINT("(WW)", __VA_ARGS__); \ LOG_ANDROID(ANDROID_LOG_WARN, __VA_ARGS__); \ } while(0) #define ERR(...) do { \ - if(gLogLevel >= LogError) \ + if(UNLIKELY(gLogLevel >= LogError)) \ AL_PRINT("(EE)", __VA_ARGS__); \ LOG_ANDROID(ANDROID_LOG_ERROR, __VA_ARGS__); \ } while(0) |