Skip to content

Commit

Permalink
Swap remove in without
Browse files Browse the repository at this point in the history
  • Loading branch information
Ukendio committed Jul 28, 2024
1 parent 5fd7e19 commit 207c9b5
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/init.luau
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 207c9b5

Please sign in to comment.