| 992 | |
| 993 | template <typename T> |
| 994 | void SetLazyArray(uint64_t arrayCount, T *arrayData, LazyGenerator generator) |
| 995 | { |
| 996 | DeleteChildren(); |
| 997 | |
| 998 | void *lazyAlloc = alloc(sizeof(LazyArrayData)); |
| 999 | |
| 1000 | m_Lazy = new(lazyAlloc) LazyArrayData; |
| 1001 | m_Lazy->generator = generator; |
| 1002 | m_Lazy->elemSize = sizeof(T); |
| 1003 | size_t sz = size_t(sizeof(T) * arrayCount); |
| 1004 | m_Lazy->data = (byte *)alloc(sz); |
| 1005 | memcpy(m_Lazy->data, arrayData, sz); |
| 1006 | data.children.resize((size_t)arrayCount); |
| 1007 | } |
| 1008 | #endif |
| 1009 | |
| 1010 | // C++ gets more extensive typecasts. We'll add a couple for python in the interface file |
nothing calls this directly
no test coverage detected