diff options
Diffstat (limited to 'core/dictionary.cpp')
-rw-r--r-- | core/dictionary.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/dictionary.cpp b/core/dictionary.cpp index a013c21b29..75c8531251 100644 --- a/core/dictionary.cpp +++ b/core/dictionary.cpp @@ -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); |