MCPcopy Create free account
hub / github.com/ValveSoftware/openvr / get

Method get

src/jsoncpp.cpp:3477–3489  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3475}
3476
3477Value Value::get(ArrayIndex index, const Value& defaultValue) const {
3478 const Value* value = &((*this)[index]);
3479 if ( value == &nullRef )
3480 {
3481 return defaultValue;
3482 }
3483 else
3484 {
3485 Value result = *value;
3486 result.default_value_ = new Value( defaultValue );
3487 return result;
3488 }
3489}
3490
3491bool Value::isValidIndex(ArrayIndex index) const { return index < size(); }
3492

Callers

nothing calls this directly

Calls 2

dataMethod · 0.80
lengthMethod · 0.45

Tested by

no test coverage detected