forked from weaselab/conflict-set
Use maxOfMax in fixupMaxVersion
This commit is contained in:
+6
-5
@@ -3033,14 +3033,15 @@ void fixupMaxVersion(Node *node, ConflictSet::Impl *impl, WriteContext *tls) {
|
||||
} break;
|
||||
case Type_Node48: {
|
||||
auto *self48 = static_cast<Node48 *>(node);
|
||||
self48->bitSet.forEachSet([&](int i) {
|
||||
max = std::max(self48->childMaxVersion[self48->index[i]], max);
|
||||
});
|
||||
for (auto v : self48->maxOfMax) {
|
||||
max = std::max(v, max);
|
||||
}
|
||||
} break;
|
||||
case Type_Node256: {
|
||||
auto *self256 = static_cast<Node256 *>(node);
|
||||
self256->bitSet.forEachSet(
|
||||
[&](int i) { max = std::max(self256->childMaxVersion[i], max); });
|
||||
for (auto v : self256->maxOfMax) {
|
||||
max = std::max(v, max);
|
||||
}
|
||||
} break;
|
||||
default: // GCOVR_EXCL_LINE
|
||||
__builtin_unreachable(); // GCOVR_EXCL_LINE
|
||||
|
||||
Reference in New Issue
Block a user