Don't call dtor since all types are trivially destructable
This commit is contained in:
parent
ae14cef6d5
commit
9830ee2fd6
1 changed files with 0 additions and 6 deletions
|
@ -158,12 +158,6 @@ namespace zecsy
|
||||||
auto& pool = pools[id];
|
auto& pool = pools[id];
|
||||||
auto index = pool.entity_to_index[e];
|
auto index = pool.entity_to_index[e];
|
||||||
|
|
||||||
/*
|
|
||||||
* T may be non-POD, so I guess I should call a destructor here
|
|
||||||
*/
|
|
||||||
auto comp_ptr = reinterpret_cast<T*>(&pool.data[index * sizeof(T)]);
|
|
||||||
comp_ptr->~T();
|
|
||||||
|
|
||||||
pool.free_list.push_back(index);
|
pool.free_list.push_back(index);
|
||||||
pool.entity_to_index.erase(e);
|
pool.entity_to_index.erase(e);
|
||||||
pool.index_to_entity.erase(index);
|
pool.index_to_entity.erase(index);
|
||||||
|
|
Loading…
Reference in a new issue