MCPcopy Create free account
hub / github.com/ValveSoftware/openvr / Value

Method Value

src/jsoncpp.cpp:2741–2766  ·  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

2739 * This optimization is used in ValueInternalMap fast allocator.
2740 */
2741Value::Value(ValueType vtype) {
2742 initBasic(vtype);
2743 switch (vtype) {
2744 case nullValue:
2745 break;
2746 case intValue:
2747 case uintValue:
2748 value_.int_ = 0;
2749 break;
2750 case realValue:
2751 value_.real_ = 0.0;
2752 break;
2753 case stringValue:
2754 value_.string_ = 0;
2755 break;
2756 case arrayValue:
2757 case objectValue:
2758 value_.map_ = new ObjectValues();
2759 break;
2760 case booleanValue:
2761 value_.bool_ = false;
2762 break;
2763 default:
2764 JSON_ASSERT_UNREACHABLE;
2765 }
2766}
2767
2768Value::Value(Int value) {
2769 initBasic(intValue);

Callers

nothing calls this directly

Calls 6

decodePrefixedStringFunction · 0.85
swapFunction · 0.85
dataMethod · 0.80
setCommentMethod · 0.80
lengthMethod · 0.45

Tested by

no test coverage detected