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

Method get

core/variant/dictionary.cpp:184–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

182}
183
184Variant Dictionary::get(const Variant &p_key, const Variant &p_default) const {
185 Variant key = p_key;
186 ERR_FAIL_COND_V(!_p->typed_key.validate(key, "get"), p_default);
187 const Variant *result = getptr(key);
188 if (!result) {
189 return p_default;
190 }
191
192 return *result;
193}
194
195Variant Dictionary::get_or_add(const Variant &p_key, const Variant &p_default) {
196 Variant key = p_key;

Callers 15

get_valuesMethod · 0.95
variant_call.cppFile · 0.45
parse_valueMethod · 0.45
writeMethod · 0.45
evaluateMethod · 0.45
validated_evaluateMethod · 0.45
ptr_evaluateMethod · 0.45
evaluateMethod · 0.45
validated_evaluateMethod · 0.45
ptr_evaluateMethod · 0.45
_convert_arrayFunction · 0.45
variant.cppFile · 0.45

Calls 1

validateMethod · 0.45

Tested by

no test coverage detected