Save some bounds checking for scanning Node256
This commit is contained in:
@@ -1762,10 +1762,9 @@ bool checkMaxBetweenExclusive(Node *n, int begin, int end,
|
|||||||
}
|
}
|
||||||
// Check inner pages
|
// Check inner pages
|
||||||
bool result = true;
|
bool result = true;
|
||||||
for (int i = 1; i < Node256::kMaxOfMaxTotalPages - 1; ++i) {
|
for (int i = (begin >> Node256::kMaxOfMaxShift) + 1;
|
||||||
result &= !((self->maxOfMax[i] > readVersion) &
|
i < ((end - 1) >> Node256::kMaxOfMaxShift); ++i) {
|
||||||
((begin >> Node256::kMaxOfMaxShift) + 1 <= i) &
|
result &= self->maxOfMax[i] <= readVersion;
|
||||||
(i < ((end - 1) >> Node256::kMaxOfMaxShift)));
|
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user