diff options
author | Yuri Roubinsky <chaosus89@gmail.com> | 2022-03-12 15:40:07 +0300 |
---|---|---|
committer | Yuri Roubinsky <chaosus89@gmail.com> | 2022-03-22 09:17:00 +0300 |
commit | c14043b166832dd63e209ab8d92dd085e5b4af3f (patch) | |
tree | 0e1af7d41c540aa71ace7c10eff678f65fcedbad /modules | |
parent | 6cba2143dee0118036ed7b6a79c81011a10d9080 (diff) |
Prevent NARROWING_CONVERSION warning for int(float) function in GDScript
Diffstat (limited to 'modules')
-rw-r--r-- | modules/gdscript/gdscript_analyzer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gdscript/gdscript_analyzer.cpp b/modules/gdscript/gdscript_analyzer.cpp index af3d65d4d6..27e1520ab8 100644 --- a/modules/gdscript/gdscript_analyzer.cpp +++ b/modules/gdscript/gdscript_analyzer.cpp @@ -2303,7 +2303,7 @@ void GDScriptAnalyzer::reduce_call(GDScriptParser::CallNode *p_call, bool p_is_a break; #ifdef DEBUG_ENABLED } else { - if (par_type.builtin_type == Variant::INT && p_call->arguments[i]->get_datatype().builtin_type == Variant::FLOAT) { + if (par_type.builtin_type == Variant::INT && p_call->arguments[i]->get_datatype().builtin_type == Variant::FLOAT && builtin_type != Variant::INT) { parser->push_warning(p_call, GDScriptWarning::NARROWING_CONVERSION, p_call->function_name); } #endif |