Save more redundant nullptr checks

This commit is contained in:
2024-03-19 14:34:59 -07:00
parent cb4c2b7e1e
commit 727b7e642a

View File

@@ -1698,6 +1698,9 @@ bool checkRangeStartsWith(Node *n, std::span<const uint8_t> key, int begin,
goto downLeftSpine;
} else {
n = nextSibling(n);
if (n == nullptr) {
return true;
}
goto downLeftSpine;
}
}
@@ -1715,6 +1718,9 @@ bool checkRangeStartsWith(Node *n, std::span<const uint8_t> key, int begin,
goto downLeftSpine;
} else {
n = nextSibling(n);
if (n == nullptr) {
return true;
}
goto downLeftSpine;
}
}
@@ -1732,9 +1738,6 @@ bool checkRangeStartsWith(Node *n, std::span<const uint8_t> key, int begin,
__builtin_unreachable(); // GCOVR_EXCL_LINE
downLeftSpine:
if (n == nullptr) {
return true;
}
for (;;) {
if (n->entryPresent) {
return n->entry.rangeVersion <= readVersion;