You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Merge pull request #84043 from dalexeev/gds-fix-unsafe-cast-warning
GDScript: Fix `UNSAFE_CAST` warning
This commit is contained in:
@@ -3439,9 +3439,7 @@ void GDScriptAnalyzer::reduce_cast(GDScriptParser::CastNode *p_cast) {
|
||||
if (op_type.is_variant() || !op_type.is_hard_type()) {
|
||||
mark_node_unsafe(p_cast);
|
||||
#ifdef DEBUG_ENABLED
|
||||
if (op_type.is_variant() && !op_type.is_hard_type()) {
|
||||
parser->push_warning(p_cast, GDScriptWarning::UNSAFE_CAST, cast_type.to_string());
|
||||
}
|
||||
parser->push_warning(p_cast, GDScriptWarning::UNSAFE_CAST, cast_type.to_string());
|
||||
#endif
|
||||
} else {
|
||||
bool valid = false;
|
||||
|
||||
Reference in New Issue
Block a user