From 2878c5adde8f2e5e93226efb0be48140362ab367 Mon Sep 17 00:00:00 2001 From: Aaron Culliney Date: Sun, 2 Jun 2019 13:11:59 -0700 Subject: [PATCH] Partial Revert "Fastpath no-logging, don't do normal logging in release but provide a means to RELEASE_LOG()" - Logging to file may still be useful in release, and we already don't do logging to logcat/stdout - TODO: verify no hotpath logging in release ... --- src/meta/log.c | 2 +- src/meta/log.h | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/meta/log.c b/src/meta/log.c index b5198503..60692365 100644 --- a/src/meta/log.c +++ b/src/meta/log.c @@ -100,7 +100,7 @@ void log_outputString(const char * const str) { return; } - if (LIKELY(!do_logging)) { + if (UNLIKELY(!do_logging)) { return; } diff --git a/src/meta/log.h b/src/meta/log.h index 8fd76647..55d2f41a 100644 --- a/src/meta/log.h +++ b/src/meta/log.h @@ -105,13 +105,9 @@ void log_outputString(const char * const str); # undef assert # define assert(e) # endif +#endif -# define LOG(...) -# define GL_MAYBELOG(...) - -#else - -# define LOG(...) \ +#define LOG(...) \ if (LIKELY(do_logging)) { \ GLenum _glerr = safeGLGetError(); \ _LOG(__VA_ARGS__); \ @@ -128,7 +124,6 @@ void log_outputString(const char * const str); _LOG(__VA_ARGS__); \ } \ } // -#endif #define RELEASE_LOG(...) \ if (LIKELY(do_logging)) { \