Remove Node::Invalid
This commit is contained in:
@@ -225,13 +225,12 @@ enum class Type : int8_t {
|
|||||||
Node16,
|
Node16,
|
||||||
Node48,
|
Node48,
|
||||||
Node256,
|
Node256,
|
||||||
Invalid,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
constexpr static int kPartialKeyMaxLenEntryPresent = 24;
|
constexpr static int kPartialKeyMaxLenEntryPresent = 24;
|
||||||
|
|
||||||
struct Node {
|
struct Node {
|
||||||
Type type = Type::Invalid;
|
Type type;
|
||||||
|
|
||||||
/* begin section that's copied to the next node */
|
/* begin section that's copied to the next node */
|
||||||
bool entryPresent = false;
|
bool entryPresent = false;
|
||||||
@@ -667,8 +666,6 @@ void eraseChild(Node *self, uint8_t index, NodeAllocators *allocators) {
|
|||||||
case Type::Node256:
|
case Type::Node256:
|
||||||
allocators->node256.release((Node256 *)child);
|
allocators->node256.release((Node256 *)child);
|
||||||
break;
|
break;
|
||||||
case Type::Invalid:
|
|
||||||
__builtin_unreachable(); // GCOVR_EXCL_LINE
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (self->type <= Type::Node16) {
|
if (self->type <= Type::Node16) {
|
||||||
@@ -1074,8 +1071,6 @@ int64_t maxBetweenExclusive(Node *n, int begin, int end) {
|
|||||||
begin, end);
|
begin, end);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case Type::Invalid:
|
|
||||||
__builtin_unreachable(); // GCOVR_EXCL_LINE
|
|
||||||
}
|
}
|
||||||
#if DEBUG_VERBOSE && !defined(NDEBUG)
|
#if DEBUG_VERBOSE && !defined(NDEBUG)
|
||||||
fprintf(stderr, "At `%s', max version in (%02x, %02x) is %" PRId64 "\n",
|
fprintf(stderr, "At `%s', max version in (%02x, %02x) is %" PRId64 "\n",
|
||||||
|
Reference in New Issue
Block a user