Initialize this value as array with initial data, without calling destructor.
| 2039 | |
| 2040 | // Initialize this value as array with initial data, without calling destructor. |
| 2041 | void SetArrayRaw(GenericValue* values, SizeType count, Allocator& allocator) { |
| 2042 | data_.f.flags = kArrayFlag; |
| 2043 | if (count) { |
| 2044 | GenericValue* e = static_cast<GenericValue*>(allocator.Malloc(count * sizeof(GenericValue))); |
| 2045 | SetElementsPointer(e); |
| 2046 | std::memcpy(static_cast<void*>(e), values, count * sizeof(GenericValue)); |
| 2047 | } |
| 2048 | else |
| 2049 | SetElementsPointer(0); |
| 2050 | data_.a.size = data_.a.capacity = count; |
| 2051 | } |
| 2052 | |
| 2053 | //! Initialize this value as object with initial data, without calling destructor. |
| 2054 | void SetObjectRaw(Member* members, SizeType count, Allocator& allocator) { |
nothing calls this directly
no test coverage detected