MCPcopy Create free account
hub / github.com/PolygonTek/BlueshiftEngine / find

Method find

Source/ThirdParty/jsoncpp/src/lib_json/json_value.cpp:1100–1110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1098bool Value::isValidIndex(ArrayIndex index) const { return index < size(); }
1099
1100Value const* Value::find(char const* key, char const* cend) const
1101{
1102 JSON_ASSERT_MESSAGE(
1103 type_ == nullValue || type_ == objectValue,
1104 "in Json::Value::find(key, end, found): requires objectValue or nullValue");
1105 if (type_ == nullValue) return NULL;
1106 CZString actualKey(key, static_cast<unsigned>(cend-key), CZString::noDuplication);
1107 ObjectValues::const_iterator it = value_.map_->find(actualKey);
1108 if (it == value_.map_->end()) return NULL;
1109 return &(*it).second;
1110}
1111const Value& Value::operator[](const char* key) const
1112{
1113 Value const* found = find(key, key + strlen(key));

Callers 5

validateMethod · 0.45
validateMethod · 0.45
json_value.cppFile · 0.45
removeMemberMethod · 0.45
removeIndexMethod · 0.45

Calls 1

endMethod · 0.45

Tested by

no test coverage detected