MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / get_valid

Method get_valid

core/variant/dictionary.cpp:173–182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

171}
172
173Variant Dictionary::get_valid(const Variant &p_key) const {
174 Variant key = p_key;
175 ERR_FAIL_COND_V(!_p->typed_key.validate(key, "get_valid"), Variant());
176 HashMap<Variant, Variant, VariantHasher, StringLikeVariantComparator>::ConstIterator E(_p->variant_map.find(key));
177
178 if (!E) {
179 return Variant();
180 }
181 return E->value;
182}
183
184Variant Dictionary::get(const Variant &p_key, const Variant &p_default) const {
185 Variant key = p_key;

Callers 4

is_inline_info_validFunction · 0.80
get_property_listMethod · 0.80
_is_valid_color_infoMethod · 0.80
test_dictionary.hFile · 0.80

Calls 3

VariantClass · 0.70
validateMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected