| 888 | Value::operator bool() const { return !isNull(); } |
| 889 | |
| 890 | void Value::clear() { |
| 891 | JSON_ASSERT_MESSAGE(type() == nullValue || type() == arrayValue || |
| 892 | type() == objectValue, |
| 893 | "in Json::Value::clear(): requires complex value"); |
| 894 | start_ = 0; |
| 895 | limit_ = 0; |
| 896 | switch (type()) { |
| 897 | case arrayValue: |
| 898 | case objectValue: |
| 899 | value_.map_->clear(); |
| 900 | break; |
| 901 | default: |
| 902 | break; |
| 903 | } |
| 904 | } |
| 905 | |
| 906 | void Value::resize(ArrayIndex newSize) { |
| 907 | JSON_ASSERT_MESSAGE(type() == nullValue || type() == arrayValue, |
no test coverage detected