From df8d092a84ea4f95ede2788cfdabc4a36491be99 Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Fri, 23 Feb 2024 14:49:42 -0800 Subject: [PATCH] Avoid some unnecessary work --- ConflictSet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ConflictSet.cpp b/ConflictSet.cpp index c4f0a98..0f56d70 100644 --- a/ConflictSet.cpp +++ b/ConflictSet.cpp @@ -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; }