mirror of
https://github.com/Ukendio/jecs.git
synced 2025-04-24 17:10:03 +00:00
Swap remove in without
This commit is contained in:
parent
5fd7e19a30
commit
207c9b5268
1 changed files with 7 additions and 2 deletions
|
@ -833,8 +833,13 @@ do
|
|||
end
|
||||
|
||||
if shouldRemove then
|
||||
table.remove(compatible_archetypes, i)
|
||||
table.remove(column_indices, i)
|
||||
local last = #compatible_archetypes
|
||||
if last ~= i then
|
||||
compatible_archetypes[i] = compatible_archetypes[last]
|
||||
column_indices[i] = column_indices[last]
|
||||
end
|
||||
compatible_archetypes[last] = nil
|
||||
column_indices[last] = nil
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue