mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
protect spam and debug a little better in opt4
This commit is contained in:
parent
d8e2e84c43
commit
7a2bc8a3ac
@ -56,7 +56,12 @@ get_severity() const {
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
INLINE void NotifyCategory::
|
INLINE void NotifyCategory::
|
||||||
set_severity(NotifySeverity severity) {
|
set_severity(NotifySeverity severity) {
|
||||||
|
#if defined(NOTIFY_DEBUG)
|
||||||
_severity = severity;
|
_severity = severity;
|
||||||
|
#else
|
||||||
|
// enforce the no-debug, no-spam rule.
|
||||||
|
_severity = max(severity, NS_info);
|
||||||
|
#endif
|
||||||
invalidate_cache();
|
invalidate_cache();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -167,7 +172,11 @@ is_fatal() const {
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
INLINE ostream &NotifyCategory::
|
INLINE ostream &NotifyCategory::
|
||||||
spam(bool prefix) const {
|
spam(bool prefix) const {
|
||||||
|
#if defined(NOTIFY_DEBUG)
|
||||||
return out(NS_spam, prefix);
|
return out(NS_spam, prefix);
|
||||||
|
#else
|
||||||
|
return Notify::null();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
@ -177,7 +186,11 @@ spam(bool prefix) const {
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
INLINE ostream &NotifyCategory::
|
INLINE ostream &NotifyCategory::
|
||||||
debug(bool prefix) const {
|
debug(bool prefix) const {
|
||||||
|
#if defined(NOTIFY_DEBUG)
|
||||||
return out(NS_debug, prefix);
|
return out(NS_debug, prefix);
|
||||||
|
#else
|
||||||
|
return Notify::null();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
|
Loading…
x
Reference in New Issue
Block a user