Prepare to bitpack node fields if desired

This commit is contained in:
2024-03-08 13:11:46 -08:00
parent 782abc70d6
commit 0038382661

View File

@@ -1613,7 +1613,8 @@ void addWriteRange(Node *&root, int64_t oldestVersion,
auto *beginNode = insert<true>(useAsRoot, begin, writeVersion, impl);
const bool insertedBegin = !std::exchange(beginNode->entryPresent, true);
const bool insertedBegin = !beginNode->entryPresent;
beginNode->entryPresent = true;
if (insertedBegin) {
auto *p = nextLogical(beginNode);
@@ -1630,7 +1631,8 @@ void addWriteRange(Node *&root, int64_t oldestVersion,
auto *endNode = insert<false>(useAsRoot, end, writeVersion, impl);
const bool insertedEnd = !std::exchange(endNode->entryPresent, true);
const bool insertedEnd = !endNode->entryPresent;
endNode->entryPresent = true;
if (insertedEnd) {
auto *p = nextLogical(endNode);