| 1098 | bool Value::isValidIndex(ArrayIndex index) const { return index < size(); } |
| 1099 | |
| 1100 | Value 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 | } |
| 1111 | const Value& Value::operator[](const char* key) const |
| 1112 | { |
| 1113 | Value const* found = find(key, key + strlen(key)); |
no test coverage detected