diff --git a/ConflictSet.cpp b/ConflictSet.cpp index d62fa34..c157a19 100644 --- a/ConflictSet.cpp +++ b/ConflictSet.cpp @@ -217,34 +217,6 @@ int getNodeIndex(Node16 *self, uint8_t index) { #endif } -[[maybe_unused]] Node *getChild(Node *self, uint8_t index) { - if (self->type == Type::Node4) { - auto *self4 = static_cast(self); - int i = getNodeIndex(self4, index); - if (i >= 0) { - return self4->children[i]; - } - return nullptr; - } else if (self->type == Type::Node16) { - auto *self16 = static_cast(self); - int i = getNodeIndex(self16, index); - if (i >= 0) { - return self16->children[i]; - } - return nullptr; - } else if (self->type == Type::Node48) { - auto *self48 = static_cast(self); - int secondIndex = self48->index[index]; - if (secondIndex >= 0) { - return self48->children[secondIndex]; - } - return nullptr; - } else { - auto *self256 = static_cast(self); - return self256->children[index]; - } -} - // Precondition - an entry for index must exist in the node Node *&getChildExists(Node *self, uint8_t index) { if (self->type == Type::Node4) {