MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / Value

Method Value

Source/JSON/jsoncpp.cpp:2461–2486  ·  view source on GitHub ↗

! \internal Default constructor initialization must be equivalent to: * memset( this, 0, sizeof(Value) ) * This optimization is used in ValueInternalMap fast allocator. */

Source from the content-addressed store, hash-verified

2459 * This optimization is used in ValueInternalMap fast allocator.
2460 */
2461Value::Value(ValueType vtype) {
2462 initBasic(vtype);
2463 switch (vtype) {
2464 case nullValue:
2465 break;
2466 case intValue:
2467 case uintValue:
2468 value_.int_ = 0;
2469 break;
2470 case realValue:
2471 value_.real_ = 0.0;
2472 break;
2473 case stringValue:
2474 value_.string_ = 0;
2475 break;
2476 case arrayValue:
2477 case objectValue:
2478 value_.map_ = new ObjectValues();
2479 break;
2480 case booleanValue:
2481 value_.bool_ = false;
2482 break;
2483 default:
2484 JSON_ASSERT_UNREACHABLE;
2485 }
2486}
2487
2488Value::Value(Int value) {
2489 initBasic(intValue);

Callers 15

LoadMethod · 0.45
LoadMethod · 0.45
LoadMethod · 0.45
LoadMethod · 0.45
LoadMethod · 0.45
LoadMethod · 0.45
LoadMethod · 0.45
LoadMethod · 0.45
LoadMethod · 0.45
LoadMethod · 0.45
LoadMethod · 0.45

Calls 6

decodePrefixedStringFunction · 0.70
dataMethod · 0.45
lengthMethod · 0.45
c_strMethod · 0.45
setCommentMethod · 0.45

Tested by

no test coverage detected