Initialize this value as array with initial data, without calling destructor.
| 1544 | |
| 1545 | // Initialize this value as array with initial data, without calling destructor. |
| 1546 | void SetArrayRaw(GenericValue* values, SizeType count, Allocator& allocator) { |
| 1547 | flags_ = kArrayFlag; |
| 1548 | data_.a.elements = (GenericValue*)allocator.Malloc(count * sizeof(GenericValue)); |
| 1549 | std::memcpy(data_.a.elements, values, count * sizeof(GenericValue)); |
| 1550 | data_.a.size = data_.a.capacity = count; |
| 1551 | } |
| 1552 | |
| 1553 | //! Initialize this value as object with initial data, without calling destructor. |
| 1554 | void SetObjectRaw(Member* members, SizeType count, Allocator& allocator) { |