| 379 | } |
| 380 | |
| 381 | void construct_chunk(sugoi_chunk_t* chunk) noexcept |
| 382 | { |
| 383 | archetype_t* type = chunk->type; |
| 384 | EIndex* offsets = type->offsets[(int)chunk->pt]; |
| 385 | uint32_t* sizes = type->sizes; |
| 386 | uint32_t* aligns = type->aligns; |
| 387 | uint32_t* elemSizes = type->elemSizes; |
| 388 | uint32_t* callbackFlags = type->callbackFlags; |
| 389 | auto maskValue = uint32_t(1 << type->type.length) - 1; |
| 390 | |
| 391 | for (SIndex i = type->firstChunkComponent; i < type->type.length; ++i) |
| 392 | { |
| 393 | decltype(type->callbacks[i].constructor) callback = nullptr; |
| 394 | if((callbackFlags[i] & SUGOI_CALLBACK_FLAG_CTOR) != 0) SUGOI_UNLIKELY |
| 395 | callback = type->callbacks[i].constructor; |
| 396 | construct_impl(sugoi_chunk_view_t{chunk, 0, 1}, type->type.data[i], offsets[i], sizes[i], aligns[i], elemSizes[i], maskValue, callback); |
| 397 | } |
| 398 | } |
| 399 | |
| 400 | void destruct_chunk(sugoi_chunk_t* chunk) noexcept |
| 401 | { |
no test coverage detected