| 950 | Value::operator bool() const { return !isNull(); } |
| 951 | |
| 952 | void Value::clear() { |
| 953 | JSON_ASSERT_MESSAGE(type_ == nullValue || type_ == arrayValue || |
| 954 | type_ == objectValue, |
| 955 | "in Json::Value::clear(): requires complex value"); |
| 956 | start_ = 0; |
| 957 | limit_ = 0; |
| 958 | switch (type_) { |
| 959 | case arrayValue: |
| 960 | case objectValue: |
| 961 | value_.map_->clear(); |
| 962 | break; |
| 963 | default: |
| 964 | break; |
| 965 | } |
| 966 | } |
| 967 | |
| 968 | void Value::resize(ArrayIndex newSize) { |
| 969 | JSON_ASSERT_MESSAGE(type_ == nullValue || type_ == arrayValue, |
no outgoing calls