summaryrefslogtreecommitdiffstats
path: root/core/object/class_db.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/object/class_db.cpp')
-rw-r--r--core/object/class_db.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/core/object/class_db.cpp b/core/object/class_db.cpp
index 876635529c..6b84dfcee9 100644
--- a/core/object/class_db.cpp
+++ b/core/object/class_db.cpp
@@ -425,8 +425,8 @@ uint32_t ClassDB::get_api_hash(APIType p_api) {
for (const StringName &F : snames) {
MethodInfo &mi = t->signal_map[F];
hash = hash_murmur3_one_64(F.hash(), hash);
- for (int i = 0; i < mi.arguments.size(); i++) {
- hash = hash_murmur3_one_64(mi.arguments[i].type, hash);
+ for (const PropertyInfo &pi : mi.arguments) {
+ hash = hash_murmur3_one_64(pi.type, hash);
}
}
}
@@ -1856,8 +1856,9 @@ void ClassDB::add_virtual_method(const StringName &p_class, const MethodInfo &p_
if (p_arg_names.size() != mi.arguments.size()) {
WARN_PRINT("Mismatch argument name count for virtual method: " + String(p_class) + "::" + p_method.name);
} else {
- for (int i = 0; i < p_arg_names.size(); i++) {
- mi.arguments[i].name = p_arg_names[i];
+ List<PropertyInfo>::Iterator itr = mi.arguments.begin();
+ for (int i = 0; i < p_arg_names.size(); ++itr, ++i) {
+ itr->name = p_arg_names[i];
}
}
}