| 1062 | |
| 1063 | |
| 1064 | bool Value::removeMember(const char* key, const char* cend, Value* removed) |
| 1065 | { |
| 1066 | if (type_ != objectValue) { |
| 1067 | return false; |
| 1068 | } |
| 1069 | CZString actualKey(key, static_cast<unsigned>(cend-key), CZString::noDuplication); |
| 1070 | ObjectValues::iterator it = value_.map_->find(actualKey); |
| 1071 | if (it == value_.map_->end()) |
| 1072 | return false; |
| 1073 | *removed = it->second; |
| 1074 | value_.map_->erase(it); |
| 1075 | return true; |
| 1076 | } |
| 1077 | bool Value::removeMember(const char* key, Value* removed) |
| 1078 | { |
| 1079 | return removeMember(key, key + strlen(key), removed); |