forked from weaselab/conflict-set
Avoid some unnecessary work
This commit is contained in:
+1
-1
@@ -565,7 +565,7 @@ void eraseChild(Node *self, uint8_t index, NodeAllocators *allocators) {
|
|||||||
assert(lastChildrenIndex >= 0);
|
assert(lastChildrenIndex >= 0);
|
||||||
if (toRemoveChildrenIndex != lastChildrenIndex) {
|
if (toRemoveChildrenIndex != lastChildrenIndex) {
|
||||||
self48->children[toRemoveChildrenIndex] =
|
self48->children[toRemoveChildrenIndex] =
|
||||||
std::exchange(self48->children[lastChildrenIndex], nullptr);
|
self48->children[lastChildrenIndex];
|
||||||
self48->index[self48->children[toRemoveChildrenIndex]->parentsIndex] =
|
self48->index[self48->children[toRemoveChildrenIndex]->parentsIndex] =
|
||||||
toRemoveChildrenIndex;
|
toRemoveChildrenIndex;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user