Merge pull request #69077 from adamscott/remove-debug-macro-for-gdscriptlanguage-script_list

Remove debug macro for GDScriptLanguage script_list assignment
This commit is contained in:
Rémi Verschelde 2022-12-10 21:57:41 +01:00 committed by GitHub
commit cd736471ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 4 deletions

View File

@ -1351,13 +1351,11 @@ void GDScript::_get_dependencies(RBSet<GDScript *> &p_dependencies, const GDScri
GDScript::GDScript() : GDScript::GDScript() :
script_list(this) { script_list(this) {
#ifdef DEBUG_ENABLED
{ {
MutexLock lock(GDScriptLanguage::get_singleton()->mutex); MutexLock lock(GDScriptLanguage::get_singleton()->mutex);
GDScriptLanguage::get_singleton()->script_list.add(&script_list); GDScriptLanguage::get_singleton()->script_list.add(&script_list);
} }
#endif
} }
void GDScript::_save_orphaned_subclasses() { void GDScript::_save_orphaned_subclasses() {
@ -1491,13 +1489,11 @@ GDScript::~GDScript() {
} }
} }
#ifdef DEBUG_ENABLED
{ {
MutexLock lock(GDScriptLanguage::get_singleton()->mutex); MutexLock lock(GDScriptLanguage::get_singleton()->mutex);
GDScriptLanguage::get_singleton()->script_list.remove(&script_list); GDScriptLanguage::get_singleton()->script_list.remove(&script_list);
} }
#endif
if (GDScriptCache::singleton) { // Cache may have been already destroyed at engine shutdown. if (GDScriptCache::singleton) { // Cache may have been already destroyed at engine shutdown.
GDScriptCache::remove_script(get_path()); GDScriptCache::remove_script(get_path());