Remove Node::Invalid

This commit is contained in:
2024-03-08 12:57:06 -08:00
parent 02afd47d8f
commit 8802d17acd

View File

@@ -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",