Remove unused code
This commit is contained in:
@@ -217,34 +217,6 @@ int getNodeIndex(Node16 *self, uint8_t index) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
[[maybe_unused]] Node *getChild(Node *self, uint8_t index) {
|
|
||||||
if (self->type == Type::Node4) {
|
|
||||||
auto *self4 = static_cast<Node4 *>(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<Node16 *>(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<Node48 *>(self);
|
|
||||||
int secondIndex = self48->index[index];
|
|
||||||
if (secondIndex >= 0) {
|
|
||||||
return self48->children[secondIndex];
|
|
||||||
}
|
|
||||||
return nullptr;
|
|
||||||
} else {
|
|
||||||
auto *self256 = static_cast<Node256 *>(self);
|
|
||||||
return self256->children[index];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Precondition - an entry for index must exist in the node
|
// Precondition - an entry for index must exist in the node
|
||||||
Node *&getChildExists(Node *self, uint8_t index) {
|
Node *&getChildExists(Node *self, uint8_t index) {
|
||||||
if (self->type == Type::Node4) {
|
if (self->type == Type::Node4) {
|
||||||
|
Reference in New Issue
Block a user