Remove dead code

This commit is contained in:
2024-02-14 11:37:11 -08:00
parent 0d9e184bac
commit c131398af6

View File

@@ -480,26 +480,6 @@ Node *nextPhysical(Node *node) {
}
}
Node *nextPhysical(Node *node, Vector<uint8_t> &searchPath) {
int index = -1;
for (;;) {
auto nextChild = getChildGeq(node, index + 1);
if (nextChild >= 0) {
auto *result = getChildExists(node, nextChild);
searchPath.push_back(nextChild);
searchPath.insert(searchPath.end(), result->partialKey,
result->partialKey + result->partialKeyLen);
return result;
}
if (node->parent == nullptr) {
return nullptr;
}
searchPath.resize(int(searchPath.size()) - 1 - node->partialKeyLen);
index = node->parentsIndex;
node = node->parent;
}
}
Node *nextLogical(Node *node) {
for (node = nextPhysical(node); node != nullptr && !node->entryPresent;
node = nextPhysical(node))
@@ -526,27 +506,6 @@ Node *nextSibling(Node *node) {
}
}
Node *nextSibling(Node *node, Vector<uint8_t> &searchPath) {
for (;;) {
if (node->parent == nullptr) {
assert(searchPath.size() == 0);
return nullptr;
}
auto next = getChildGeq(node->parent, node->parentsIndex + 1);
if (next < 0) {
searchPath.resize(int(searchPath.size()) - (1 + node->partialKeyLen));
node = node->parent;
} else {
searchPath.resize(int(searchPath.size()) - (1 + node->partialKeyLen));
auto *result = getChildExists(node->parent, next);
searchPath.push_back(next);
searchPath.insert(searchPath.end(), result->partialKey,
result->partialKey + result->partialKeyLen);
return result;
}
}
}
// Performs a physical search for remaining
struct SearchStepWise {
Node *n;
@@ -845,7 +804,7 @@ int firstNeqStride(const uint8_t *ap, const uint8_t *bp) {
return i + (std::countr_zero(bitfield) >> 2);
}
}
__builtin_unreachable();
__builtin_unreachable(); // GCOVR_EXCL_LINE
#else
int i = 0;
for (; i < kStride - 1; ++i) {