MCPcopy Create free account
hub / github.com/USCiLab/cereal / SetObjectRaw

Function SetObjectRaw

include/cereal/external/rapidjson/document.h:2054–2064  ·  view source on GitHub ↗

Initialize this value as object with initial data, without calling destructor.

Source from the content-addressed store, hash-verified

2052
2053 //! Initialize this value as object with initial data, without calling destructor.
2054 void SetObjectRaw(Member* members, SizeType count, Allocator& allocator) {
2055 data_.f.flags = kObjectFlag;
2056 if (count) {
2057 Member* m = static_cast<Member*>(allocator.Malloc(count * sizeof(Member)));
2058 SetMembersPointer(m);
2059 std::memcpy(static_cast<void*>(m), members, count * sizeof(Member));
2060 }
2061 else
2062 SetMembersPointer(0);
2063 data_.o.size = data_.o.capacity = count;
2064 }
2065
2066 //! Initialize this value as constant string, without calling destructor.
2067 void SetStringRaw(StringRefType s) CEREAL_RAPIDJSON_NOEXCEPT {

Callers

nothing calls this directly

Calls 2

SetMembersPointerFunction · 0.85
MallocMethod · 0.45

Tested by

no test coverage detected