You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-14 13:41:12 +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:
@@ -54,8 +54,8 @@ int RegExMatch::_find(const Variant &p_name) const {
|
||||
return -1;
|
||||
}
|
||||
return i;
|
||||
} else if (p_name.get_type() == Variant::STRING || p_name.get_type() == Variant::STRING_NAME) {
|
||||
HashMap<String, int>::ConstIterator found = names.find((String)p_name);
|
||||
} else if (p_name.is_string()) {
|
||||
HashMap<String, int>::ConstIterator found = names.find(p_name);
|
||||
if (found) {
|
||||
return found->value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user