summaryrefslogtreecommitdiffstats
path: root/modules/regex
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-09-03 17:38:06 +0200
committerRémi Verschelde <rverschelde@gmail.com>2024-09-03 17:38:06 +0200
commit13a90e938f0e3ae567f7d7256e35c38bf744e59d (patch)
tree120e69941581aa607fcd43349f32666ea9d59d1b /modules/regex
parent514c564a8c855d798ec6b5a52860e5bca8d57bc9 (diff)
parent154049ce1792a6e12b990e0a414a6c084c3b91c5 (diff)
downloadredot-engine-13a90e938f0e3ae567f7d7256e35c38bf744e59d.tar.gz
Merge pull request #70096 from rune-scape/stringname-dict
StringName Dictionary keys
Diffstat (limited to 'modules/regex')
-rw-r--r--modules/regex/regex.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/regex/regex.cpp b/modules/regex/regex.cpp
index 85c0b9ecad..9c366408a0 100644
--- a/modules/regex/regex.cpp
+++ b/modules/regex/regex.cpp
@@ -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;
}