diff --git a/dtool/src/prc/notifyCategory.h b/dtool/src/prc/notifyCategory.h index 9a2a9fa4e2..db767336b1 100644 --- a/dtool/src/prc/notifyCategory.h +++ b/dtool/src/prc/notifyCategory.h @@ -55,8 +55,8 @@ PUBLISHED: INLINE bool is_spam() const; INLINE bool is_debug() const; #else - constexpr static bool is_spam() { return false; } - constexpr static bool is_debug() { return false; } + constexpr bool is_spam() const { return false; } + constexpr bool is_debug() const { return false; } #endif INLINE bool is_info() const; INLINE bool is_warning() const; diff --git a/dtool/src/prc/notifyCategoryProxy.I b/dtool/src/prc/notifyCategoryProxy.I index fbdac1f0ca..ddd10b772d 100644 --- a/dtool/src/prc/notifyCategoryProxy.I +++ b/dtool/src/prc/notifyCategoryProxy.I @@ -65,26 +65,30 @@ is_on(NotifySeverity severity) { /** * */ -#ifdef NOTIFY_DEBUG template INLINE bool NotifyCategoryProxy:: is_spam() { +#ifdef NOTIFY_DEBUG // Instruct the compiler to optimize for the usual case. return UNLIKELY(get_unsafe_ptr()->is_spam()); -} +#else + return false; #endif +} /** * */ -#ifdef NOTIFY_DEBUG template INLINE bool NotifyCategoryProxy:: is_debug() { +#ifdef NOTIFY_DEBUG // Instruct the compiler to optimize for the usual case. return UNLIKELY(get_unsafe_ptr()->is_debug()); -} +#else + return false; #endif +} /** * diff --git a/dtool/src/prc/notifyCategoryProxy.h b/dtool/src/prc/notifyCategoryProxy.h index 5465529583..5ca79a6594 100644 --- a/dtool/src/prc/notifyCategoryProxy.h +++ b/dtool/src/prc/notifyCategoryProxy.h @@ -71,13 +71,8 @@ public: INLINE bool is_on(NotifySeverity severity); -#if defined(NOTIFY_DEBUG) || defined(CPPPARSER) INLINE bool is_spam(); INLINE bool is_debug(); -#else - constexpr static bool is_spam() { return false; } - constexpr static bool is_debug() { return false; } -#endif INLINE bool is_info(); INLINE bool is_warning(); INLINE bool is_error();