| 3588 | bool Value::isValidIndex(ArrayIndex index) const { return index < size(); } |
| 3589 | |
| 3590 | Value const* Value::find(char const* begin, char const* end) const { |
| 3591 | JSON_ASSERT_MESSAGE(type_ == nullValue || type_ == objectValue, |
| 3592 | "in Json::Value::find(key, end, found): requires " |
| 3593 | "objectValue or nullValue"); |
| 3594 | if (type_ == nullValue) |
| 3595 | return NULL; |
| 3596 | CZString actualKey(begin, static_cast<unsigned>(end - begin), |
| 3597 | CZString::noDuplication); |
| 3598 | ObjectValues::const_iterator it = value_.map_->find(actualKey); |
| 3599 | if (it == value_.map_->end()) |
| 3600 | return NULL; |
| 3601 | return &(*it).second; |
| 3602 | } |
| 3603 | const Value& Value::operator[](const char* key) const { |
| 3604 | Value const* found = find(key, key + strlen(key)); |
| 3605 | if (!found) |
no test coverage detected