diff --git a/dtool/src/dconfig/notifyCategory.I b/dtool/src/dconfig/notifyCategory.I index d92a885797..2c4c49756d 100644 --- a/dtool/src/dconfig/notifyCategory.I +++ b/dtool/src/dconfig/notifyCategory.I @@ -57,7 +57,7 @@ is_on(NotifySeverity severity) const { return (int)severity >= (int)_severity; } -#ifdef NOTIFY_DEBUG +#if defined(NOTIFY_DEBUG) || defined(CPPPARSER) //////////////////////////////////////////////////////////////////// // Function: NotifyCategory::is_spam // Access: Public diff --git a/dtool/src/dconfig/notifyCategory.h b/dtool/src/dconfig/notifyCategory.h index 182116d1dd..8f307d225e 100644 --- a/dtool/src/dconfig/notifyCategory.h +++ b/dtool/src/dconfig/notifyCategory.h @@ -35,7 +35,13 @@ PUBLISHED: INLINE bool is_on(NotifySeverity severity) const; -#ifdef NOTIFY_DEBUG + // When NOTIFY_DEBUG is not defined, the categories will never be + // set to "spam" or "debug" severities, and these methods are + // redefined to be static to make it more obvious to the compiler. + // However, we still want 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