MCPcopy Create free account
hub / github.com/Norbyte/bg3se / GetStorage

Method GetStorage

BG3Extender/GameDefinitions/EntitySystem.cpp:573–584  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

571}
572
573ComponentFrameStorage* EntityCommandBuffer::GetStorage(ComponentTypeIndex type, uint16_t componentSize, void* dtor)
574{
575 auto storage = Data.ComponentPools.Find(type);
576 if (!storage) {
577 storage = Data.ComponentPools.Add(type, Allocator);
578 storage->ComponentSizeInBytes = componentSize;
579 storage->ComponentTypeId = type;
580 storage->DestructorProc = dtor;
581 }
582
583 return storage;
584}
585
586void* EntityCommandBuffer::CreateComponentRaw(EntityHandle entity, ComponentTypeIndex type, uint16_t componentSize, ComponentFrameStorageIndex& index, void* dtor)
587{

Callers

nothing calls this directly

Calls 2

FindMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected