Skip to content

Commit 347e51e

Browse files
committed
Merge pull request #105922 from aaronp64/dictionary_has_all
Avoid extra copy/validation of keys in `Dictionary::has_all`
2 parents b1b873a + e4bd611 commit 347e51e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/variant/dictionary.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ bool Dictionary::has_all(const Array &p_keys) const {
225225
for (int i = 0; i < p_keys.size(); i++) {
226226
Variant key = p_keys[i];
227227
ERR_FAIL_COND_V(!_p->typed_key.validate(key, "use 'has_all'"), false);
228-
if (!has(key)) {
228+
if (!_p->variant_map.has(key)) {
229229
return false;
230230
}
231231
}

0 commit comments

Comments
 (0)