| 1167 | |
| 1168 | |
| 1169 | bool Value::removeMember(const char* key, const char* cend, Value* removed) |
| 1170 | { |
| 1171 | if (type_ != objectValue) { |
| 1172 | return false; |
| 1173 | } |
| 1174 | CZString actualKey(key, static_cast<unsigned>(cend-key), CZString::noDuplication); |
| 1175 | ObjectValues::iterator it = value_.map_->find(actualKey); |
| 1176 | if (it == value_.map_->end()) |
| 1177 | return false; |
| 1178 | *removed = it->second; |
| 1179 | value_.map_->erase(it); |
| 1180 | return true; |
| 1181 | } |
| 1182 | bool Value::removeMember(const char* key, Value* removed) |
| 1183 | { |
| 1184 | return removeMember(key, key + strlen(key), removed); |