Initialize this value as object with initial data, without calling destructor.
| 1987 | |
| 1988 | //! Initialize this value as object with initial data, without calling destructor. |
| 1989 | void SetObjectRaw(Member* members, SizeType count, Allocator& allocator) { |
| 1990 | data_.f.flags = kObjectFlag; |
| 1991 | if (count) { |
| 1992 | Member* m = static_cast<Member*>(allocator.Malloc(count * sizeof(Member))); |
| 1993 | SetMembersPointer(m); |
| 1994 | std::memcpy(m, members, count * sizeof(Member)); |
| 1995 | } |
| 1996 | else |
| 1997 | SetMembersPointer(0); |
| 1998 | data_.o.size = data_.o.capacity = count; |
| 1999 | } |
| 2000 | |
| 2001 | //! Initialize this value as constant string, without calling destructor. |
| 2002 | void SetStringRaw(StringRefType s) RAPIDJSON_NOEXCEPT { |
nothing calls this directly
no test coverage detected