Avoid some unnecessary work
All checks were successful
Tests / Release [gcc] total: 471, passed: 471
GNU C Compiler (gcc) |Total|New|Outstanding|Fixed|Trend |:-:|:-:|:-:|:-:|:-: |0|0|0|0|:clap: Reference build: <a href="https://jenkins.weaselab.dev/job/weaselab/job/conflict-set/job/main/36//gcc">weaselab » conflict-set » main #36</a>
Tests / Coverage total: 469, passed: 469
weaselab/conflict-set/pipeline/head This commit looks good

This commit is contained in:
2024-02-23 14:49:42 -08:00
parent 438a2e2abc
commit df8d092a84

View File

@@ -565,7 +565,7 @@ void eraseChild(Node *self, uint8_t index, NodeAllocators *allocators) {
assert(lastChildrenIndex >= 0);
if (toRemoveChildrenIndex != lastChildrenIndex) {
self48->children[toRemoveChildrenIndex] =
std::exchange(self48->children[lastChildrenIndex], nullptr);
self48->children[lastChildrenIndex];
self48->index[self48->children[toRemoveChildrenIndex]->parentsIndex] =
toRemoveChildrenIndex;
}