Review feedback

This commit is contained in:
Bart
2026-05-11 09:45:01 -04:00
parent e21f879437
commit 4ba60eae21
3 changed files with 6 additions and 2 deletions

View File

@@ -84,6 +84,7 @@ struct SHAMapNodeData
Blob data;
bool isLeaf;
// TODO: This constructor can be removed once we have fully switched to C++20 or beyond.
SHAMapNodeData(SHAMapNodeID const& id, Blob d, bool leaf)
: nodeID(id), data(std::move(d)), isLeaf(leaf)
{

View File

@@ -431,8 +431,10 @@ inline TaggedPointer::TaggedPointer(
// allocate hashes and children, but do not run constructors
TaggedPointer newHashesAndChildren{RawAllocateTag{}, toAllocate};
SHAMapHash *newHashes = nullptr, *oldHashes = nullptr;
SHAMapTreeNodePtr *newChildren = nullptr, *oldChildren = nullptr;
SHAMapHash* newHashes = nullptr;
SHAMapHash* oldHashes = nullptr;
SHAMapTreeNodePtr* newChildren = nullptr;
SHAMapTreeNodePtr* oldChildren = nullptr;
std::uint8_t newNumAllocated = 0;
// structured bindings can't be captured in c++ 17; use tie instead
std::tie(newNumAllocated, newHashes, newChildren) = newHashesAndChildren.getHashesAndChildren();