Remove unnecessary casts

This commit is contained in:
2024-08-20 10:30:27 -07:00
parent cdf9a8a7b0
commit e3a77ed773

View File

@@ -1355,7 +1355,7 @@ Node *&getOrCreateChild(Node *&self, std::span<const uint8_t> &key,
auto *self3 = static_cast<Node3 *>(self);
int i = self->numChildren - 1;
for (; i >= 0; --i) {
if (int(self3->index[i]) < int(index)) {
if (self3->index[i] < index) {
break;
}
self3->index[i + 1] = self3->index[i];
@@ -1385,7 +1385,7 @@ Node *&getOrCreateChild(Node *&self, std::span<const uint8_t> &key,
auto *self16 = static_cast<Node16 *>(self);
int i = self->numChildren - 1;
for (; i >= 0; --i) {
if (int(self16->index[i]) < int(index)) {
if (self16->index[i] < index) {
break;
}
self16->index[i + 1] = self16->index[i];