Browse Source

*** empty log message ***

David Rose 24 years ago
parent
commit
5ec86c98b8

+ 2 - 1
dtool/LocalSetup.pp

@@ -91,7 +91,8 @@ $[cdefine HAVE_NET]
 /* Define if we want to use PStats.  */
 $[cdefine DO_PSTATS]
 
-/* Define if we want to use keep Notify debug messages.  */
+/* Define if we want to keep Notify debug messages around, or undefine 
+   to compile them out.  */
 $[cdefine NOTIFY_DEBUG]
 
 /* Define if we want to compile the audio code.  */

+ 0 - 5
dtool/src/dconfig/notifyCategoryProxy.h

@@ -72,13 +72,8 @@ public:
 
   INLINE bool is_on(NotifySeverity severity);
 
-#ifdef NOTIFY_DEBUG
   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();

+ 0 - 2
panda/src/char/character.cxx

@@ -104,11 +104,9 @@ app_traverse() {
   double now = ClockObject::get_global_clock()->get_frame_time();
   get_bundle()->advance_time(now);
 
-#ifndef NDEBUG
   if (char_cat.is_debug()) {
     char_cat.debug() << "Animating " << *this << " at time " << now << "\n";
   }
-#endif
 
   update();
 }

+ 1 - 1
panda/src/collide/collisionNode.cxx

@@ -166,7 +166,7 @@ recompute_bound() {
   bool success =
     _bound->around(child_begin, child_end);
 
-#ifndef NDEBUG
+#ifdef NOTIFY_DEBUG
   if (!success) {
     collide_cat.error()
       << "Unable to generate bounding volume for " << *this << ":\n"

+ 0 - 2
panda/src/collide/collisionPolygon.cxx

@@ -130,7 +130,6 @@ xform(const LMatrix4f &mat) {
   // and then convert them back.  Hopefully we won't lose too much
   // precision during all of this.
 
-#ifndef NDEBUG
   if (collide_cat.is_debug()) {
     collide_cat.debug()
       << "CollisionPolygon transformed by:\n";
@@ -140,7 +139,6 @@ xform(const LMatrix4f &mat) {
 	<< "  (no points)\n";
     }
   }
-#endif
 
   if (!_points.empty()) {
     vector<LPoint3f> verts;

+ 1 - 5
panda/src/cull/cullTraverser.I

@@ -19,12 +19,10 @@
 ////////////////////////////////////////////////////////////////////
 INLINE void CullTraverser::
 draw_geom(GeomNode *geom_node, const AllAttributesWrapper &initial_state) {
-#ifndef NDEBUG
   if (cull_cat.is_spam()) {
     cull_cat.spam() 
       << "Drawing " << *geom_node << " with state: " << initial_state << "\n";
   }
-#endif
   nassertv(geom_node != (GeomNode *)NULL);
   _gsg->set_state(initial_state.get_attributes(), true);
   _gsg->prepare_display_region();
@@ -58,12 +56,10 @@ draw_direct(const ArcChain &arc_chain,
 	    const AllAttributesWrapper &initial_state) {
   nassertv(!arc_chain.empty());
   Node *node = arc_chain.back()->get_child();
-#ifndef NDEBUG
   if (cull_cat.is_spam()) {
     cull_cat.spam() 
       << "Drawing " << *node << " in direct mode.\n";
   }
-#endif
   nassertv(node != (Node *)NULL);
   DirectRenderTraverser drt(_gsg, _graph_type, arc_chain);
   drt.traverse(node, initial_state, AllTransitionsWrapper());
@@ -105,7 +101,7 @@ find_bin_state(const AllTransitionsWrapper &trans) {
   // corresponding CullState that is (now) stored in the set.
   pair<States::iterator, bool> result = _states.insert(cs);
 
-#ifndef NDEBUG
+#ifdef NOTIFY_DEBUG
   if (cull_cat.is_spam()) {
     if (result.second) {
       // The insert succeeded, so the CullState was not there

+ 0 - 2
panda/src/cull/cullTraverser.cxx

@@ -577,7 +577,6 @@ forward_arc(NodeRelation *arc, NullTransitionWrapper &,
 
   mark_forward_arc(arc);
 
-#ifndef NDEBUG
   if (cull_cat.is_spam()) {
     cull_cat.spam() 
       << "Reached " << *node << ":\n"
@@ -590,7 +589,6 @@ forward_arc(NodeRelation *arc, NullTransitionWrapper &,
       << " has_direct_render = " << has_direct_render
       << "\n";
   }
-#endif
 
   if (is_instanced || is_geom || node_has_sub_render || 
       arc_num_sub_render != 0 || has_direct_render) {

+ 4 - 4
panda/src/dgraph/dataGraphTraverser.cxx

@@ -22,7 +22,7 @@ r_traverse(Node *node, NodeAttributes &data, bool has_spam_mode) {
   if (node->is_of_type(DataNode::get_class_type())) {
     DCAST_INTO_V(data_node, node);
 
-#ifndef NDEBUG
+#ifdef NOTIFY_DEBUG
     has_spam_mode = has_spam_mode || data_node->get_spam_mode();
 #endif
   }
@@ -37,7 +37,7 @@ r_traverse(Node *node, NodeAttributes &data, bool has_spam_mode) {
 
     // Now ask the node to transmit its overall data.
     if (data_node != (DataNode *)NULL) {
-#ifndef NDEBUG
+#ifdef NOTIFY_DEBUG
       if (has_spam_mode && dgraph_cat.is_info()) {
 	dgraph_cat.info() << "Sending into " << *node << " {\n";
 	describe_data_verbose(dgraph_cat.info(false), data, 2);
@@ -70,7 +70,7 @@ r_traverse_below(Node *node, NodeAttributes &data, bool has_spam_mode) {
   if (node->is_of_type(DataNode::get_class_type())) {
     DCAST_INTO_V(data_node, node);
 
-#ifndef NDEBUG
+#ifdef NOTIFY_DEBUG
     has_spam_mode = has_spam_mode || data_node->get_spam_mode();
 #endif
   }
@@ -173,7 +173,7 @@ resume(Node *node, DataGraphTraverser::SavedState &state) {
   if (node->is_of_type(DataNode::get_class_type())) {
     DCAST_INTO_V(data_node, node);
 
-#ifndef NDEBUG
+#ifdef NOTIFY_DEBUG
     if (state._has_spam_mode && dgraph_cat.is_info()) {
       dgraph_cat.info() << "Sending into " << *node << " {\n";
       describe_data_verbose(dgraph_cat.info(false), state._data, 2);

+ 0 - 10
panda/src/graph/allTransitionsWrapper.I

@@ -321,13 +321,11 @@ INLINE_GRAPH Node *AllTransitionsWrapper::
 extract_from_cache(const NodeRelation *arc) {
   _cache = arc->_net_transitions;
   _all_verified = arc->_all_verified;
-#ifndef NDEBUG
   if (wrt_cat.is_spam()) {
     wrt_cat.spam()
       << "AllTransitionsWrapper::extract_from_cache(" << *arc
       << "), _all_verified = " << _all_verified << "\n";
   }
-#endif
   return arc->_top_subtree;
 }
 
@@ -345,13 +343,11 @@ store_to_cache(NodeRelation *arc, Node *top_subtree) {
   arc->_net_transitions = _cache;
   arc->_all_verified = _all_verified;
 
-#ifndef NDEBUG
   if (wrt_cat.is_spam()) {
     wrt_cat.spam()
       << "AllTransitionsWrapper::store_to_cache(" << *arc
       << "), _all_verified = " << _all_verified << "\n";
   }
-#endif
 }
 
 ////////////////////////////////////////////////////////////////////
@@ -370,13 +366,11 @@ store_to_cache_partial(NodeRelation *arc, Node *top_subtree) {
   arc->_net_transitions = 
     NodeTransitionCache::c_union(arc->_net_transitions, _cache);
 
-#ifndef NDEBUG
   if (wrt_cat.is_spam()) {
     wrt_cat.spam()
       << "AllTransitionsWrapper::store_to_cache_partial(" << *arc
       << "), _all_verified = " << _all_verified << "\n";
   }
-#endif
 }
 
 ////////////////////////////////////////////////////////////////////
@@ -386,14 +380,12 @@ store_to_cache_partial(NodeRelation *arc, Node *top_subtree) {
 ////////////////////////////////////////////////////////////////////
 INLINE_GRAPH bool AllTransitionsWrapper::
 is_cache_verified(UpdateSeq as_of) const {
-#ifndef NDEBUG
   if (wrt_cat.is_spam()) {
     wrt_cat.spam()
       << "AllTransitionsWrapper::is_cache_verified(" << as_of 
       << "), _all_verified = " << _all_verified << ", result = "
       << (as_of <= _all_verified) << "\n";
   }
-#endif
   return as_of <= _all_verified;
 }
 
@@ -407,12 +399,10 @@ set_computed_verified(UpdateSeq now) {
   _cache = NodeTransitionCache::set_computed_verified(_cache, now);
   _all_verified = now;
 
-#ifndef NDEBUG
   if (wrt_cat.is_spam()) {
     wrt_cat.spam()
       << "AllTransitionsWrapper::set_computed_verified(" << now << ")\n";
   }
-#endif
 }
 
 ////////////////////////////////////////////////////////////////////

+ 5 - 8
panda/src/graph/nodeTransitionCacheEntry.I

@@ -155,14 +155,12 @@ get_trans() const {
 ////////////////////////////////////////////////////////////////////
 INLINE_GRAPH bool NodeTransitionCacheEntry::
 is_cache_verified(UpdateSeq as_of) const {
-#ifndef NDEBUG
   if (wrt_cat.is_spam()) {
     wrt_cat.spam()
       << "NodeTransitionCacheEntry::is_cache_verified(" << as_of 
       << "), _verified = " << _verified << ", result = "
       << (as_of <= _verified) << "\n";
   }
-#endif
   return as_of <= _verified;
 }
 
@@ -303,7 +301,6 @@ cached_compose(const NodeTransitionCacheEntry &a,
 	       const NodeTransitionCacheEntry &cache, 
 	       const NodeTransitionCacheEntry &b,
 	       UpdateSeq now) {
-#ifndef NDEBUG
   if (wrt_cat.is_spam()) {
     wrt_cat.spam()
       << "Composing:\n"
@@ -311,7 +308,7 @@ cached_compose(const NodeTransitionCacheEntry &a,
       << " cache) " << cache << " = " << cache._computed << "\n"
       << "     b) " << b << " = " << b._computed << "\n";
   }
-#endif
+
   if (cache._computed == UpdateSeq::initial() ||
       (a._computed == UpdateSeq::initial() && 
        b._computed == UpdateSeq::initial()) ||
@@ -323,11 +320,11 @@ cached_compose(const NodeTransitionCacheEntry &a,
     // directly.
     NodeTransitionCacheEntry result = compose(a, b);
     result.set_computed_verified(now);
-#ifndef NDEBUG
+
     if (wrt_cat.is_spam()) {
       wrt_cat.spam() << "computed result is " << result << "\n";
     }
-#endif
+
     return result;
 
   } else {
@@ -335,11 +332,11 @@ cached_compose(const NodeTransitionCacheEntry &a,
     // directly.
     NodeTransitionCacheEntry result = cache;
     result._verified = now;
-#ifndef NDEBUG
+
     if (wrt_cat.is_spam()) {
       wrt_cat.spam() << "cached result is " << result << "\n";
     }
-#endif
+
     return result;
   }
 }

+ 4 - 21
panda/src/graph/wrt.I

@@ -3,7 +3,7 @@
 // 
 ////////////////////////////////////////////////////////////////////
 
-#ifndef NDEBUG
+#ifdef NOTIFY_DEBUG
 ////////////////////////////////////////////////////////////////////
 //     Function: describe_ambiguous_wrt
 //  Description: Writes an error message to wrt_cat describing an
@@ -106,7 +106,6 @@ get_cached_net_transition(NodeRelation *arc, Node *&root,
     root = top_subtree;
     net = cur_cache;
 
-#ifndef NDEBUG
     if (wrt_cat.is_debug()) {
       wrt_cat.debug()
 	<< "get_cached_net_transition(" << *arc->get_child() << ", ";
@@ -122,7 +121,6 @@ get_cached_net_transition(NodeRelation *arc, Node *&root,
 	wrt_cat.spam() << "result of " << *arc << " is " << net << "\n";
       }	
     }
-#endif
 
   } else {
     // This arc's cache hasn't recently been verified, and we need to
@@ -168,7 +166,6 @@ get_cached_net_transition(NodeRelation *arc, Node *&root,
       net.store_to_cache(arc, root);
     }
 
-#ifndef NDEBUG
     if (wrt_cat.is_debug()) {
       wrt_cat.debug()
 	<< "get_cached_net_transition(" << *arc->get_child() << ", ";
@@ -184,7 +181,6 @@ get_cached_net_transition(NodeRelation *arc, Node *&root,
 	wrt_cat.spam() << "result of " << *arc << " is " << net << "\n";
       }	
     }
-#endif
   }
 }    
 
@@ -216,12 +212,10 @@ get_cached_net_transition(const Node *node,
     // the NULL node is by convention equivalent to the root.
     result.make_identity();
 
-#ifndef NDEBUG
     if (wrt_cat.is_debug()) {
       wrt_cat.debug()
 	<< "get_cached_net_transition((top))\n";
     }
-#endif
     return;
   }
 
@@ -239,12 +233,10 @@ get_cached_net_transition(const Node *node,
     // This node has no parents.  Stop here.
     result.make_identity();
     
-#ifndef NDEBUG
     if (wrt_cat.is_debug()) {
       wrt_cat.debug()
 	<< "get_cached_net_transition(" << *node << ") has no parents.\n";
     }
-#endif
     return;
 
   } else {
@@ -260,7 +252,7 @@ get_cached_net_transition(const Node *node,
     }
 
     if (parent_arc == (NodeRelation *)NULL) {
-#ifndef NDEBUG
+#ifndef NOTIFY_DEBUG
       // No, it wasn't mentioned.  Issue a warning and use the first
       // one.
       describe_ambiguous_wrt(node, arc_list_begin, arc_list_end, graph_type);
@@ -352,7 +344,7 @@ get_uncached_net_transition(const Node *node,
     }
 
     if (parent_arc == (NodeRelation *)NULL) {
-#ifndef NDEBUG
+#ifndef NOTIFY_DEBUG
       // No, it wasn't mentioned.  Issue a warning and use the first
       // one. 
       describe_ambiguous_wrt(node, arc_list_begin, arc_list_end, graph_type);
@@ -405,7 +397,6 @@ cached_wrt_base(const Node *from,
 
   TransitionWrapper net_from_trans = TransitionWrapper::init_from(result);
 
-#ifndef NDEBUG
   if (wrt_cat.is_debug()) {
     wrt_cat.debug()
       << "Computing wrt(";
@@ -423,7 +414,6 @@ cached_wrt_base(const Node *from,
       << "), as of " << now << " (now is " 
       << now << ")\n";
   }
-#endif
 
   get_cached_net_transition(from, from_arcs_begin, from_arcs_end, 
 			    now, now, net_from_trans, graph_type);
@@ -743,7 +733,6 @@ cached_wrt_subtree(NodeRelation *arc, Node *to, UpdateSeq as_of, UpdateSeq now,
     // If the top of the subtree is the node we asked to wrt to,
     // excellent!  Stop here.
 
-#ifndef NDEBUG
     if (wrt_cat.is_spam()) {
       wrt_cat.spam()
 	<< "cached_wrt_subtree(" << *arc << ", ";
@@ -755,7 +744,6 @@ cached_wrt_subtree(NodeRelation *arc, Node *to, UpdateSeq as_of, UpdateSeq now,
       wrt_cat.spam(false) << ") stops at top, result is:\n";
       result.write(wrt_cat.spam(false), 2);
     }
-#endif
 
   } else {
 
@@ -763,7 +751,6 @@ cached_wrt_subtree(NodeRelation *arc, Node *to, UpdateSeq as_of, UpdateSeq now,
     // some descendent of the top_subtree node.  It also therefore
     // follows that this node has exactly one parent.
 
-#ifndef NDEBUG
     if (wrt_cat.is_spam()) {
       wrt_cat.spam()
 	<< "cached_wrt_subtree(" << *arc << ", " << *to << ") stops at ";
@@ -775,7 +762,6 @@ cached_wrt_subtree(NodeRelation *arc, Node *to, UpdateSeq as_of, UpdateSeq now,
       wrt_cat.spam(false) << ", first result is:\n";
       result.write(wrt_cat.spam(false), 2);
     }
-#endif
 
     if (to->get_num_parents(graph_type) != 1) {
       // Oops!  We *don't* have exactly one parent.  This means our
@@ -785,12 +771,11 @@ cached_wrt_subtree(NodeRelation *arc, Node *to, UpdateSeq as_of, UpdateSeq now,
 
       // This, of course, assumes we haven't just asked for the wrt()
       // from the very latest timestamp.
-#ifndef NDEBUG
       if (wrt_cat.is_warning()) {
 	wrt_cat.warning()
 	  << "Recovering from stale cache.\n";
       }
-#endif
+
       nassertr(as_of != UpdateSeq::fresh(), NULL);
       return cached_wrt_subtree(arc, to, UpdateSeq::fresh(), now,
 				result, graph_type);
@@ -812,7 +797,6 @@ cached_wrt_subtree(NodeRelation *arc, Node *to, UpdateSeq as_of, UpdateSeq now,
     // And now compute the actual wrt.
     result.invert_compose_in_place(net_from_trans);
 
-#ifndef NDEBUG
     if (wrt_cat.is_spam()) {
       wrt_cat.spam()
 	<< "cached_wrt_subtree(" << *arc << ", " << *to << ") stops at ";
@@ -826,7 +810,6 @@ cached_wrt_subtree(NodeRelation *arc, Node *to, UpdateSeq as_of, UpdateSeq now,
       wrt_cat.spam() << ", final result is:\n";
       result.write(wrt_cat.spam(false), 2);
     }
-#endif
   }
 
 #ifndef NDEBUG

+ 3 - 3
panda/src/linmath/lmatrix3_src.I

@@ -764,9 +764,9 @@ invert_from(const FLOATNAME(LMatrix3) &other) {
   FLOATTYPE other_det = MATRIX3_DETERMINANT(other._m.m);
 
   if (IS_NEARLY_ZERO(other_det)) {
-	#ifndef NDEBUG
-       linmath_cat.warning() << "Tried to invert singular LMatrix3.\n";
-	#endif
+#ifdef NOTIFY_DEBUG
+    linmath_cat.warning() << "Tried to invert singular LMatrix3.\n";
+#endif
     (*this) = ident_mat();
     return false;
   }

+ 0 - 14
panda/src/putil/bamReader.cxx

@@ -91,7 +91,6 @@ init() {
     return false;
   }
 
-#ifndef NDEBUG
   if (bam_cat.is_debug()) {
     bam_cat.debug() 
       << "Bam file is version " << _file_major << "." << _file_minor
@@ -102,7 +101,6 @@ init() {
 	<< ".)\n";
     }
   }
-#endif
 
   return true;
 }
@@ -150,12 +148,10 @@ read_object() {
   // Now look up the pointer of the object we read first.  It should
   // be available now.
   if (object_id == 0) {
-#ifndef NDEBUG
     if (bam_cat.is_spam()) {
       bam_cat.spam()
 	<< "Returning NULL\n";
     }
-#endif
     return (TypedWritable *)NULL;
   }
 
@@ -169,14 +165,12 @@ read_object() {
   } else {
     TypedWritable *object = (*oi).second;
 
-#ifndef NDEBUG
     if (bam_cat.is_spam()) {
       if (object != (TypedWritable *)NULL) {
 	bam_cat.spam()
 	  << "Returning object of type " << object->get_type() << "\n";
       }
     }
-#endif
     
     return object;
   }
@@ -342,12 +336,10 @@ read_handle(DatagramIterator &scan) {
   bool inserted = _index_map.insert(IndexMap::value_type(id, type)).second;
   nassertr(inserted, type);
 
-#ifndef NDEBUG
   if (bam_cat.is_spam()) {
     bam_cat.spam()
       << "Read TypeHandle for " << type << ".\n";
   }
-#endif
 
   return type;
 }
@@ -549,12 +541,10 @@ p_read_object() {
   if (!_source->get_datagram(packet)) {
     // When we run out of datagrams, we're at the end of the file.
 
-#ifndef NDEBUG
     if (bam_cat.is_debug()) {
       bam_cat.debug()
 	<< "Reached end of bam source.\n";
     }
-#endif
     return 0;
   }
 
@@ -616,12 +606,10 @@ p_read_object() {
 	<< " was created instead." << endl;
 
     } else {
-#ifndef NDEBUG
       if (bam_cat.is_spam()) {
 	bam_cat.spam()
 	  << "Read a " << object->get_type() << "\n";
       }
-#endif
     }
   }
 
@@ -637,12 +625,10 @@ p_read_object() {
 ////////////////////////////////////////////////////////////////////
 void BamReader::
 finalize() {
-#ifndef NDEBUG
   if (bam_cat.is_debug()) {
     bam_cat.debug()
       << "Finalizing bam source\n";
   }
-#endif
 
   Finalize::iterator fi = _finalize_list.begin();
   while (fi != _finalize_list.end()) {

+ 0 - 4
panda/src/putil/factoryBase.cxx

@@ -44,7 +44,6 @@ make_instance(TypeHandle handle, const FactoryParams &params) {
     instance = make_instance_more_specific(handle, params);
   }
 
-#ifndef NDEBUG
   if (util_cat.is_debug()) {
     util_cat.debug()
       << "make_instance(" << handle << ", params) returns "
@@ -55,7 +54,6 @@ make_instance(TypeHandle handle, const FactoryParams &params) {
     }
     util_cat.debug(false) << "\n";
   }
-#endif
   return instance;
 }
 
@@ -80,7 +78,6 @@ make_instance_more_general(TypeHandle handle, const FactoryParams &params) {
     object = make_instance_exact(handle, params);
   }
 
-#ifndef NDEBUG
   if (util_cat.is_debug()) {
     util_cat.debug()
       << "make_instance(" << handle << ", params) returns "
@@ -91,7 +88,6 @@ make_instance_more_general(TypeHandle handle, const FactoryParams &params) {
     }
     util_cat.debug(false) << "\n";
   }
-#endif
 
   return object;
 }

+ 8 - 11
panda/src/sgraphutil/frustumCullTraverser.I

@@ -46,14 +46,12 @@ FrustumCullTraverser(ArcChain &arc_chain, Node *root,
     local_frustum = DCAST(GeometricBoundingVolume, _view_frustum->make_copy());
     local_frustum->xform(rel_from_camera);
 
-#ifndef NDEBUG
     if (sgraphutil_cat.is_spam()) {
       sgraphutil_cat.spam()
 	<< "Beginning frustum cull, frustum is: " << *local_frustum << "\n"
 	<< "Transform is:\n";
       rel_from_camera.write(sgraphutil_cat.spam(false), 2);
     }
-#endif
   }
 
   bool needs_top_node = !_arc_chain.has_node();
@@ -116,13 +114,13 @@ traverse(NodeRelation *arc, AttributeWrapper render_state,
 	int result = local_frustum->contains(arc_gbv);
 	if (result == BoundingVolume::IF_no_intersection) {
 	  // No intersection at all.  Cull.
-#ifndef NDEBUG	
-	  if (sgraphutil_cat.is_spam() && !arc_volume.is_empty()) {
-	    sgraphutil_cat.spam()
-	      << "Culling " << *arc->get_child() << " with volume "
-	      << arc_volume << "\n";
+	  if (sgraphutil_cat.is_spam()) {
+	    if (!arc_volume.is_empty()) {
+	      sgraphutil_cat.spam()
+		<< "Culling " << *arc->get_child() << " with volume "
+		<< arc_volume << "\n";
+	    }
 	  }
-#endif
 
 	  /*
 	  if (fake_view_frustum_cull) {
@@ -188,14 +186,13 @@ traverse(NodeRelation *arc, AttributeWrapper render_state,
 	    nassertv(local_frustum != (GeometricBoundingVolume *)NULL);
 	    local_frustum->xform(tt->get_matrix());
 
-#ifndef NDEBUG	    
 	    if (sgraphutil_cat.is_spam()) {
 	      sgraphutil_cat.spam()
-		<< "Transforming frustum into local space of " << *arc << ": " << *local_frustum << "\n"
+		<< "Transforming frustum into local space of " << *arc
+		<< ": " << *local_frustum << "\n"
 		<< "Transform is:\n";
 	      tt->get_matrix().write(sgraphutil_cat.spam(false), 2);
 	    }
-#endif
 	  }
 	}
       }

+ 6 - 5
panda/src/switchnode/switchNodeOne.I

@@ -47,11 +47,12 @@ operator = (const SwitchNodeOne &copy) {
 ////////////////////////////////////////////////////////////////////
 INLINE void SwitchNodeOne::
 select_child(int index) {
-#ifndef NDEBUG
-  if (_selected_child_index != index && switchnode_cat.is_debug()) {
-    switchnode_cat.debug()
-      << *this << " selecting child " << index << "\n";
+  if (switchnode_cat.is_debug()) {
+    if (_selected_child_index != index) {
+      switchnode_cat.debug()
+	<< *this << " selecting child " << index << "\n";
+    }
   }
-#endif
+
   _selected_child_index = index;
 }