mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Merge pull request #105922 from aaronp64/dictionary_has_all
Avoid extra copy/validation of keys in `Dictionary::has_all`
This commit is contained in:
@@ -225,7 +225,7 @@ bool Dictionary::has_all(const Array &p_keys) const {
|
||||
for (int i = 0; i < p_keys.size(); i++) {
|
||||
Variant key = p_keys[i];
|
||||
ERR_FAIL_COND_V(!_p->typed_key.validate(key, "use 'has_all'"), false);
|
||||
if (!has(key)) {
|
||||
if (!_p->variant_map.has(key)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user