MCPcopy Create free account
hub / github.com/axmolengine/axmol / reset

Method reset

core/base/Value.cpp:938–965  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

936}
937
938void Value::reset(Type type)
939{
940 if (_type == type)
941 return;
942
943 clear();
944
945 // Allocate memory for the new value
946 switch (type)
947 {
948 case Type::STRING:
949 _field.strVal = new std::string();
950 break;
951 case Type::VECTOR:
952 _field.vectorVal = new ValueVector();
953 break;
954 case Type::MAP:
955 _field.mapVal = new ValueMap();
956 break;
957 case Type::INT_KEY_MAP:
958 _field.intKeyMapVal = new ValueMapIntKey();
959 break;
960 default:
961 break;
962 }
963
964 _type = type;
965}
966
967}

Callers 2

closeFileMappingMethod · 0.45
makeInstanceFunction · 0.45

Calls 1

clearFunction · 0.50

Tested by

no test coverage detected