| 398 | } |
| 399 | |
| 400 | void destruct_chunk(sugoi_chunk_t* chunk) noexcept |
| 401 | { |
| 402 | archetype_t* type = chunk->type; |
| 403 | EIndex* offsets = type->offsets[(int)chunk->pt]; |
| 404 | uint32_t* sizes = type->sizes; |
| 405 | uint32_t* elemSizes = type->elemSizes; |
| 406 | uint32_t* callbackFlags = type->callbackFlags; |
| 407 | for (SIndex i = type->firstChunkComponent; i < type->type.length; ++i) |
| 408 | { |
| 409 | decltype(type->callbacks[i].destructor) callback = nullptr; |
| 410 | if((callbackFlags[i] & SUGOI_CALLBACK_FLAG_CTOR) != 0) SUGOI_UNLIKELY |
| 411 | callback = type->callbacks[i].destructor; |
| 412 | destruct_impl(sugoi_chunk_view_t{chunk, 0, 1}, type->type.data[i], offsets[i], sizes[i], elemSizes[i], type->resourceFields[i], callback); |
| 413 | } |
| 414 | } |
| 415 | |
| 416 | void move_view(const sugoi_chunk_view_t& view, EIndex srcStart) noexcept |
| 417 | { |
no test coverage detected