Browse Source

*** empty log message ***

David Rose 24 years ago
parent
commit
c24ba5273b
2 changed files with 8 additions and 2 deletions
  1. 1 1
      dtool/src/dconfig/notifyCategory.I
  2. 7 1
      dtool/src/dconfig/notifyCategory.h

+ 1 - 1
dtool/src/dconfig/notifyCategory.I

@@ -57,7 +57,7 @@ is_on(NotifySeverity severity) const {
   return (int)severity >= (int)_severity;
   return (int)severity >= (int)_severity;
 }
 }
 
 
-#ifdef NOTIFY_DEBUG
+#if defined(NOTIFY_DEBUG) || defined(CPPPARSER)
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: NotifyCategory::is_spam
 //     Function: NotifyCategory::is_spam
 //       Access: Public
 //       Access: Public

+ 7 - 1
dtool/src/dconfig/notifyCategory.h

@@ -35,7 +35,13 @@ PUBLISHED:
   
   
   INLINE bool is_on(NotifySeverity severity) const;
   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_spam() const;
   INLINE bool is_debug() const;
   INLINE bool is_debug() const;
 #else
 #else