forked from weaselab/conflict-set
Fix condition checking for erasing the root
This commit is contained in:
+1
-2
@@ -1885,10 +1885,9 @@ void downsize(Node *self, WriteContext *writeContext) {
|
|||||||
// Precondition: self is not the root. May invalidate nodes along the search
|
// Precondition: self is not the root. May invalidate nodes along the search
|
||||||
// path to self. May invalidate children of self->parent. Returns a pointer to
|
// path to self. May invalidate children of self->parent. Returns a pointer to
|
||||||
// the node after self. Precondition: `self->entryPresent`
|
// the node after self. Precondition: `self->entryPresent`
|
||||||
|
|
||||||
Node *erase(Node *self, WriteContext *writeContext, bool logical) {
|
Node *erase(Node *self, WriteContext *writeContext, bool logical) {
|
||||||
++writeContext->accum.entries_erased;
|
++writeContext->accum.entries_erased;
|
||||||
assert(self->parent != nullptr);
|
assert(self->parent->parent != nullptr);
|
||||||
|
|
||||||
#if DEBUG_VERBOSE && !defined(NDEBUG)
|
#if DEBUG_VERBOSE && !defined(NDEBUG)
|
||||||
fprintf(stderr, "Erase: %s\n", getSearchPathPrintable(self).c_str());
|
fprintf(stderr, "Erase: %s\n", getSearchPathPrintable(self).c_str());
|
||||||
|
|||||||
Reference in New Issue
Block a user