From 8802d17acdd4278e4f4c79e1666ed3c09b3e21c5 Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Fri, 8 Mar 2024 12:57:06 -0800 Subject: [PATCH] Remove Node::Invalid --- ConflictSet.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/ConflictSet.cpp b/ConflictSet.cpp index 8cfd87d..745ce4e 100644 --- a/ConflictSet.cpp +++ b/ConflictSet.cpp @@ -225,13 +225,12 @@ enum class Type : int8_t { Node16, Node48, Node256, - Invalid, }; constexpr static int kPartialKeyMaxLenEntryPresent = 24; struct Node { - Type type = Type::Invalid; + Type type; /* begin section that's copied to the next node */ bool entryPresent = false; @@ -667,8 +666,6 @@ void eraseChild(Node *self, uint8_t index, NodeAllocators *allocators) { case Type::Node256: allocators->node256.release((Node256 *)child); break; - case Type::Invalid: - __builtin_unreachable(); // GCOVR_EXCL_LINE } if (self->type <= Type::Node16) { @@ -1074,8 +1071,6 @@ int64_t maxBetweenExclusive(Node *n, int begin, int end) { begin, end); break; } - case Type::Invalid: - __builtin_unreachable(); // GCOVR_EXCL_LINE } #if DEBUG_VERBOSE && !defined(NDEBUG) fprintf(stderr, "At `%s', max version in (%02x, %02x) is %" PRId64 "\n",