diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/object.cpp | 4 | ||||
-rw-r--r-- | core/object.h | 5 |
2 files changed, 0 insertions, 9 deletions
diff --git a/core/object.cpp b/core/object.cpp index aaa37e6cf2..239700a4ab 100644 --- a/core/object.cpp +++ b/core/object.cpp @@ -1919,9 +1919,7 @@ ObjectID ObjectDB::add_instance(Object *p_object) { rw_lock->write_lock(); instances[++instance_counter] = p_object; -#ifdef DEBUG_ENABLED instance_checks[p_object] = instance_counter; -#endif rw_lock->write_unlock(); return instance_counter; @@ -1932,9 +1930,7 @@ void ObjectDB::remove_instance(Object *p_object) { rw_lock->write_lock(); instances.erase(p_object->get_instance_id()); -#ifdef DEBUG_ENABLED instance_checks.erase(p_object); -#endif rw_lock->write_unlock(); } diff --git a/core/object.h b/core/object.h index 8306b5a356..c405e22557 100644 --- a/core/object.h +++ b/core/object.h @@ -762,15 +762,10 @@ public: static void debug_objects(DebugFunc p_func); static int get_object_count(); -#ifdef DEBUG_ENABLED _FORCE_INLINE_ static bool instance_validate(Object *p_ptr) { return instance_checks.has(p_ptr); } -#else - _FORCE_INLINE_ static bool instance_validate(Object *p_ptr) { return true; } - -#endif }; //needed by macros |