diff --git a/ConflictSet.cpp b/ConflictSet.cpp index 5358115..6da19a9 100644 --- a/ConflictSet.cpp +++ b/ConflictSet.cpp @@ -447,9 +447,7 @@ inline void Node48::copyChildrenAndKeyFrom(const Node256 &other) { inline void Node256::copyChildrenAndKeyFrom(const Node48 &other) { memcpy((char *)this + kNodeCopyBegin, (char *)&other + kNodeCopyBegin, kNodeCopySize); - for (int i = 0; i < 256; ++i) { - children[i].child = nullptr; - } + memset(children, 0, sizeof(children)); bitSet = other.bitSet; bitSet.forEachInRange( [&](int c) { @@ -464,9 +462,7 @@ inline void Node256::copyChildrenAndKeyFrom(const Node48 &other) { inline void Node256::copyChildrenAndKeyFrom(const Node256 &other) { memcpy((char *)this + kNodeCopyBegin, (char *)&other + kNodeCopyBegin, kNodeCopySize); - for (int i = 0; i < 256; ++i) { - children[i].child = nullptr; - } + memset(children, 0, sizeof(children)); bitSet = other.bitSet; bitSet.forEachInRange( [&](int c) {