From 2af4a15df2a89271677730018edf6b213bd1aec9 Mon Sep 17 00:00:00 2001 From: David Rose Date: Wed, 17 Aug 2005 01:06:10 +0000 Subject: [PATCH] fix opt4 build --- dtool/src/interrogatedb/typeRegistry.I | 17 ----------------- dtool/src/interrogatedb/typeRegistry.cxx | 10 ++-------- dtool/src/interrogatedb/typeRegistry.h | 7 ------- 3 files changed, 2 insertions(+), 32 deletions(-) diff --git a/dtool/src/interrogatedb/typeRegistry.I b/dtool/src/interrogatedb/typeRegistry.I index e8bb3373de..a2f75baf6d 100644 --- a/dtool/src/interrogatedb/typeRegistry.I +++ b/dtool/src/interrogatedb/typeRegistry.I @@ -17,23 +17,6 @@ //////////////////////////////////////////////////////////////////// -#ifdef NDEBUG -// This function is only inline if NDEBUG is defined. Otherwise, it -// is non-inline and its definition appears in typeRegistry.cxx. - -//////////////////////////////////////////////////////////////////// -// Function: TypeRegistry::look_up -// Access: Private -// Description: Returns the TypeRegistryNode associated with the -// indicated TypeHandle. -//////////////////////////////////////////////////////////////////// -INLINE TypeRegistryNode *TypeRegistry:: -look_up(TypeHandle handle, TypedObject *) const { - return _handle_registry[handle._index]; -} -#endif // NDEBUG - - //////////////////////////////////////////////////////////////////// // Function: TypeRegistry::freshen_derivations // Access: Private diff --git a/dtool/src/interrogatedb/typeRegistry.cxx b/dtool/src/interrogatedb/typeRegistry.cxx index c4db51135b..63f3558360 100644 --- a/dtool/src/interrogatedb/typeRegistry.cxx +++ b/dtool/src/interrogatedb/typeRegistry.cxx @@ -584,11 +584,6 @@ write_node(ostream &out, int indent_level, const TypeRegistryNode *node) const { } } -#ifndef NDEBUG -// This function is only non-inline if NDEBUG is not defined. -// Otherwise, it is inline and its definition appears in -// typeRegistry.I. - //////////////////////////////////////////////////////////////////// // Function: TypeRegistry::look_up // Access: Private @@ -604,6 +599,7 @@ write_node(ostream &out, int indent_level, const TypeRegistryNode *node) const { //////////////////////////////////////////////////////////////////// TypeRegistryNode *TypeRegistry:: look_up(TypeHandle handle, TypedObject *object) const { +#ifndef NDEBUG if (handle._index == 0) { // The TypeHandle is unregistered. This is an error condition. @@ -650,6 +646,7 @@ look_up(TypeHandle handle, TypedObject *object) const { << "! Is memory corrupt?\n"; nassertr(false, NULL); } +#endif // NDEBUG return _handle_registry[handle._index]; } @@ -689,6 +686,3 @@ extern "C" int get_best_parent_from_Set(int id, const std::set &set) return th.get_best_parent_from_Set(set); } - -#endif // NDEBUG - diff --git a/dtool/src/interrogatedb/typeRegistry.h b/dtool/src/interrogatedb/typeRegistry.h index 82059266f5..da2bf07f7f 100644 --- a/dtool/src/interrogatedb/typeRegistry.h +++ b/dtool/src/interrogatedb/typeRegistry.h @@ -88,14 +88,7 @@ private: TypeRegistry(); static void init_global_pointer(); - - // In NDEBUG mode, this is an inline function; otherwise, it's - // out-of-line. -#ifdef NDEBUG - INLINE TypeRegistryNode *look_up(TypeHandle type, TypedObject *object) const; -#else TypeRegistryNode *look_up(TypeHandle type, TypedObject *object) const; -#endif INLINE void freshen_derivations(); void rebuild_derivations();