| 2284 | bool Value::operator!() const { return isNull(); } |
| 2285 | |
| 2286 | void Value::clear() { |
| 2287 | JSON_ASSERT_MESSAGE(type_ == nullValue || type_ == arrayValue || |
| 2288 | type_ == objectValue, |
| 2289 | "in Json::Value::clear(): requires complex value"); |
| 2290 | start_ = 0; |
| 2291 | limit_ = 0; |
| 2292 | switch (type_) { |
| 2293 | #ifndef JSON_VALUE_USE_INTERNAL_MAP |
| 2294 | case arrayValue: |
| 2295 | case objectValue: |
| 2296 | value_.map_->clear(); |
| 2297 | break; |
| 2298 | #else |
| 2299 | case arrayValue: |
| 2300 | value_.array_->clear(); |
| 2301 | break; |
| 2302 | case objectValue: |
| 2303 | value_.map_->clear(); |
| 2304 | break; |
| 2305 | #endif |
| 2306 | default: |
| 2307 | break; |
| 2308 | } |
| 2309 | } |
| 2310 | |
| 2311 | void Value::resize(ArrayIndex newSize) { |
| 2312 | JSON_ASSERT_MESSAGE(type_ == nullValue || type_ == arrayValue, |
no outgoing calls
no test coverage detected