diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-01-17 10:12:44 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-01-17 10:30:15 +0100 |
commit | 0a7579b161834d052e89e9319ed248a04554e85d (patch) | |
tree | efbd1ce1c0640ac685667155e57a0354e58e9395 /modules/mono | |
parent | 107f2961ccfac179af7682eb5f6e7ea91e80040c (diff) | |
download | redot-engine-0a7579b161834d052e89e9319ed248a04554e85d.tar.gz |
Fix `#if *_ENABLED` inconsistencies, should check if defined
Co-authored-by: Caroline Joy Bell <halotroop2288@proton.me>
Diffstat (limited to 'modules/mono')
-rw-r--r-- | modules/mono/csharp_script.cpp | 6 | ||||
-rw-r--r-- | modules/mono/glue/runtime_interop.cpp | 2 | ||||
-rw-r--r-- | modules/mono/utils/path_utils.cpp | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp index ac6977504a..55af8a7d8c 100644 --- a/modules/mono/csharp_script.cpp +++ b/modules/mono/csharp_script.cpp @@ -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(); diff --git a/modules/mono/glue/runtime_interop.cpp b/modules/mono/glue/runtime_interop.cpp index 3518507f8c..0089e9c2a2 100644 --- a/modules/mono/glue/runtime_interop.cpp +++ b/modules/mono/glue/runtime_interop.cpp @@ -316,7 +316,7 @@ void godotsharp_internal_new_csharp_script(Ref<CSharpScript> *r_dest) { } void godotsharp_internal_editor_file_system_update_file(const String *p_script_path) { -#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(); diff --git a/modules/mono/utils/path_utils.cpp b/modules/mono/utils/path_utils.cpp index aa97534675..ee17a668d7 100644 --- a/modules/mono/utils/path_utils.cpp +++ b/modules/mono/utils/path_utils.cpp @@ -152,7 +152,7 @@ String realpath(const String &p_path) { } return result.simplify_path(); -#elif UNIX_ENABLED +#elif defined(UNIX_ENABLED) char *resolved_path = ::realpath(p_path.utf8().get_data(), nullptr); if (!resolved_path) { |