| 3326 | Value::operator bool() const { return !isNull(); } |
| 3327 | |
| 3328 | void Value::clear() { |
| 3329 | JSON_ASSERT_MESSAGE(type() == nullValue || type() == arrayValue || |
| 3330 | type() == objectValue, |
| 3331 | "in Json::Value::clear(): requires complex value"); |
| 3332 | start_ = 0; |
| 3333 | limit_ = 0; |
| 3334 | switch (type()) { |
| 3335 | case arrayValue: |
| 3336 | case objectValue: |
| 3337 | value_.map_->clear(); |
| 3338 | break; |
| 3339 | default: |
| 3340 | break; |
| 3341 | } |
| 3342 | } |
| 3343 | |
| 3344 | void Value::resize(ArrayIndex newSize) { |
| 3345 | JSON_ASSERT_MESSAGE(type() == nullValue || type() == arrayValue, |