| 363 | } |
| 364 | |
| 365 | void destruct_view(const sugoi_chunk_view_t& view) noexcept |
| 366 | { |
| 367 | archetype_t* type = view.chunk->type; |
| 368 | EIndex* offsets = type->offsets[(int)view.chunk->pt]; |
| 369 | uint32_t* sizes = type->sizes; |
| 370 | uint32_t* elemSizes = type->elemSizes; |
| 371 | uint32_t* callbackFlags = type->callbackFlags; |
| 372 | for (SIndex i = 0; i < type->firstChunkComponent; ++i) |
| 373 | { |
| 374 | decltype(type->callbacks[i].destructor) callback = nullptr; |
| 375 | if((callbackFlags[i] & SUGOI_CALLBACK_FLAG_CTOR) != 0) SUGOI_UNLIKELY |
| 376 | callback = type->callbacks[i].destructor; |
| 377 | destruct_impl(view, type->type.data[i], offsets[i], sizes[i], elemSizes[i], type->resourceFields[i], callback); |
| 378 | } |
| 379 | } |
| 380 | |
| 381 | void construct_chunk(sugoi_chunk_t* chunk) noexcept |
| 382 | { |
no test coverage detected