diff --git a/dtool/src/prc/notifyCategory.I b/dtool/src/prc/notifyCategory.I index 20678fbace..74c1965778 100644 --- a/dtool/src/prc/notifyCategory.I +++ b/dtool/src/prc/notifyCategory.I @@ -64,14 +64,17 @@ is_on(NotifySeverity severity) const { return (int)severity >= (int)get_severity(); } -#if defined(NOTIFY_DEBUG) || defined(CPPPARSER) /** * A shorthand way to write is_on(NS_spam). */ INLINE bool NotifyCategory:: is_spam() const { +#if defined(NOTIFY_DEBUG) || defined(CPPPARSER) // Instruct the compiler to optimize for the usual case. return UNLIKELY(is_on(NS_spam)); +#else + return false; +#endif } /** @@ -79,10 +82,13 @@ is_spam() const { */ INLINE bool NotifyCategory:: is_debug() const { +#if defined(NOTIFY_DEBUG) || defined(CPPPARSER) // Instruct the compiler to optimize for the usual case. return UNLIKELY(is_on(NS_debug)); -} +#else + return false; #endif +} /** * A shorthand way to write is_on(NS_info). diff --git a/dtool/src/prc/notifyCategory.h b/dtool/src/prc/notifyCategory.h index db767336b1..96d2897921 100644 --- a/dtool/src/prc/notifyCategory.h +++ b/dtool/src/prc/notifyCategory.h @@ -51,13 +51,8 @@ PUBLISHED: // to present a consistent interface to our scripting language, so during // the interrogate pass (that is, when CPPPARSER is defined), we still // pretend they're nonstatic. -#if defined(NOTIFY_DEBUG) || defined(CPPPARSER) INLINE bool is_spam() const; INLINE bool is_debug() const; -#else - 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; INLINE bool is_error() const;