dictionary has_all
This commit is contained in:
@ -110,6 +110,16 @@ bool Dictionary::has(const Variant& p_key) const {
|
||||
|
||||
return _p->variant_map.has(p_key);
|
||||
}
|
||||
|
||||
bool Dictionary::has_all(const Array& p_keys) const {
|
||||
for (int i=0;i<p_keys.size();i++) {
|
||||
if( !has(p_keys[i]) ) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void Dictionary::erase(const Variant& p_key) {
|
||||
_copy_on_write();
|
||||
_p->variant_map.erase(p_key);
|
||||
|
||||
Reference in New Issue
Block a user