1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Fix #if *_ENABLED inconsistencies, should check if defined

Co-authored-by: Caroline Joy Bell <halotroop2288@proton.me>
This commit is contained in:
Rémi Verschelde
2024-01-17 10:12:44 +01:00
parent 107f2961cc
commit 0a7579b161
10 changed files with 15 additions and 15 deletions

View File

@@ -1074,7 +1074,7 @@ void CSharpLanguage::reload_assemblies(bool p_soft_reload) {
}
// The script instance could not be instantiated or wasn't in the list of placeholders to replace.
obj->set_script(scr);
#if DEBUG_ENABLED
#ifdef DEBUG_ENABLED
// If we reached here, the instantiated script must be a placeholder.
CRASH_COND(!obj->get_script_instance()->is_placeholder());
#endif
@@ -2310,7 +2310,7 @@ void CSharpScript::reload_registered_script(Ref<CSharpScript> p_script) {
p_script->_update_exports();
#if TOOLS_ENABLED
#ifdef TOOLS_ENABLED
// If the EditorFileSystem singleton is available, update the file;
// otherwise, the file will be updated when the singleton becomes available.
EditorFileSystem *efs = EditorFileSystem::get_singleton();
@@ -2666,7 +2666,7 @@ Error CSharpScript::reload(bool p_keep_state) {
_update_exports();
#if TOOLS_ENABLED
#ifdef TOOLS_ENABLED
// If the EditorFileSystem singleton is available, update the file;
// otherwise, the file will be updated when the singleton becomes available.
EditorFileSystem *efs = EditorFileSystem::get_singleton();