MCPcopy Create free account
hub / github.com/cinder/Cinder / clear

Method clear

src/jsoncpp/jsoncpp.cpp:2286–2309  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2284bool Value::operator!() const { return isNull(); }
2285
2286void 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
2311void Value::resize(ArrayIndex newSize) {
2312 JSON_ASSERT_MESSAGE(type_ == nullValue || type_ == arrayValue,

Callers 2

parseMethod · 0.45
isMultineArrayMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected