From ff1e7cfbf4b7ad9b327588ce7dffb43d31fee3e9 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Mon, 7 May 2018 17:30:03 -0300 Subject: Add is_instance_valid() method to GDScript, ending more than a decade of pain. --- core/object.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'core/object.cpp') diff --git a/core/object.cpp b/core/object.cpp index aaa37e6cf..239700a4a 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(); } -- cgit v1.2.3-70-g09d2