*** empty log message ***

This commit is contained in:
David Rose 2001-05-16 22:28:05 +00:00
parent 3eb794fa60
commit d7ac937b37
3 changed files with 40 additions and 8 deletions

View File

@ -57,6 +57,7 @@ is_on(NotifySeverity severity) const {
return (int)severity >= (int)_severity;
}
#ifndef NDEBUG
////////////////////////////////////////////////////////////////////
// Function: NotifyCategory::is_spam
// Access: Public
@ -64,11 +65,7 @@ is_on(NotifySeverity severity) const {
////////////////////////////////////////////////////////////////////
INLINE bool NotifyCategory::
is_spam() const {
#ifndef NDEBUG
return is_on(NS_spam);
#else
return false;
#endif
}
////////////////////////////////////////////////////////////////////
@ -78,12 +75,35 @@ is_spam() const {
////////////////////////////////////////////////////////////////////
INLINE bool NotifyCategory::
is_debug() const {
#ifndef NDEBUG
return is_on(NS_debug);
#else
return false;
#endif
}
#else
////////////////////////////////////////////////////////////////////
// Function: NotifyCategory::is_spam
// Access: Public, Static
// Description: In NDEBUG mode, the categories are never set to
// "spam" or "debug" severities, and these methods are
// redefined to be static to make the more obvious to
// the compiler.
////////////////////////////////////////////////////////////////////
INLINE bool NotifyCategory::
is_spam() {
return false;
}
////////////////////////////////////////////////////////////////////
// Function: NotifyCategory::is_debug
// Access: Public
// Description: In NDEBUG mode, the categories are never set to
// "spam" or "debug" severities, and these methods are
// redefined to be static to make the more obvious to
// the compiler.
////////////////////////////////////////////////////////////////////
INLINE bool NotifyCategory::
is_debug() {
return false;
}
#endif
////////////////////////////////////////////////////////////////////
// Function: NotifyCategory::is_info

View File

@ -34,8 +34,14 @@ PUBLISHED:
INLINE void set_severity(NotifySeverity severity);
INLINE bool is_on(NotifySeverity severity) const;
#ifndef NDEBUG
INLINE bool is_spam() const;
INLINE bool is_debug() const;
#else
INLINE static bool is_spam();
INLINE static bool is_debug();
#endif
INLINE bool is_info() const;
INLINE bool is_warning() const;
INLINE bool is_error() const;

View File

@ -71,8 +71,14 @@ public:
// used only in non-static-init functions.
INLINE bool is_on(NotifySeverity severity);
#ifndef NDEBUG
INLINE bool is_spam();
INLINE bool is_debug();
#else
INLINE static bool is_spam();
INLINE static bool is_debug();
#endif
INLINE bool is_info();
INLINE bool is_warning();
INLINE bool is_error();