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

Method Value

vrclient_x64/jsoncpp.cpp:2740–2765  ·  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

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

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected