1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

StringName Dictionary keys

also added 'is_string()' method to Variant
and refactored many String type comparisons to use it instead
This commit is contained in:
rune-scape
2023-12-28 14:44:23 -08:00
committed by rune-scape
parent 40b378e9e2
commit 154049ce17
34 changed files with 65 additions and 82 deletions

View File

@@ -71,7 +71,7 @@ Error GDScriptEditorTranslationParserPlugin::parse_file(const String &p_path, Ve
bool GDScriptEditorTranslationParserPlugin::_is_constant_string(const GDScriptParser::ExpressionNode *p_expression) {
ERR_FAIL_NULL_V(p_expression, false);
return p_expression->is_constant && (p_expression->reduced_value.get_type() == Variant::STRING || p_expression->reduced_value.get_type() == Variant::STRING_NAME);
return p_expression->is_constant && p_expression->reduced_value.is_string();
}
void GDScriptEditorTranslationParserPlugin::_traverse_class(const GDScriptParser::ClassNode *p_class) {