MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / destruct_view

Function destruct_view

modules/engine/runtime/src/ecs/chunk_view.cpp:365–379  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

363}
364
365void 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
381void construct_chunk(sugoi_chunk_t* chunk) noexcept
382{

Callers 3

destroyMethod · 0.85
castMethod · 0.85
clearMethod · 0.85

Calls 1

destruct_implFunction · 0.70

Tested by

no test coverage detected