Fix #if *_ENABLED inconsistencies, should check if defined

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
This commit is contained in:
Caroline Joy Bell
2024-01-16 14:16:47 -06:00
committed by Rémi Verschelde
parent 62858097aa
commit 9c0bd332a5
7 changed files with 16 additions and 16 deletions

View File

@ -2833,7 +2833,7 @@ void CSharpScript::initialize_for_managed_type(Ref<CSharpScript> p_script, GDMon
p_script->tool = nesting_class && nesting_class->has_attribute(CACHED_CLASS(ToolAttribute));
}
#if TOOLS_ENABLED
#ifdef TOOLS_ENABLED
if (!p_script->tool) {
p_script->tool = p_script->script_class->get_assembly() == GDMono::get_singleton()->get_tools_assembly();
}
@ -3174,7 +3174,7 @@ Error CSharpScript::reload(bool p_keep_state) {
tool = nesting_class && nesting_class->has_attribute(CACHED_CLASS(ToolAttribute));
}
#if TOOLS_ENABLED
#ifdef TOOLS_ENABLED
if (!tool) {
tool = script_class->get_assembly() == GDMono::get_singleton()->get_tools_assembly();
}

View File

@ -140,7 +140,7 @@ void gd_unhandled_exception_event(MonoException *p_exc) {
mono_runtime_invoke(unhandled_exception_method, nullptr, (void **)args, nullptr);
}
#if DEBUG_ENABLED
#ifdef DEBUG_ENABLED
static String _get_var_type(const Variant *p_var) {
String basestr;

View File

@ -133,7 +133,7 @@ String realpath(const String &p_path) {
::CloseHandle(hFile);
return buffer.simplify_path();
#elif UNIX_ENABLED
#elif defined(UNIX_ENABLED)
char *resolved_path = ::realpath(p_path.utf8().get_data(), NULL);
if (!resolved_path)