mirror of
https://github.com/godotengine/godot
synced 2024-11-02 08:53:46 +00:00
Merge pull request #59064 from Chaosus/gds_fix_narrowing_conv_warning
Prevent NARROWING_CONVERSION warning for `int(float)` function in GDScript
This commit is contained in:
commit
c422dc5feb
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue