forked from weaselab/conflict-set
Cachegrind says this is fewer instructions
This commit is contained in:
+2
-1
@@ -322,7 +322,8 @@ inline void Node3::copyChildrenAndKeyFrom(const Node0 &other) {
|
|||||||
inline void Node3::copyChildrenAndKeyFrom(const Node3 &other) {
|
inline void Node3::copyChildrenAndKeyFrom(const Node3 &other) {
|
||||||
memcpy((char *)this + kNodeCopyBegin, (char *)&other + kNodeCopyBegin,
|
memcpy((char *)this + kNodeCopyBegin, (char *)&other + kNodeCopyBegin,
|
||||||
kNodeCopySize);
|
kNodeCopySize);
|
||||||
memcpy(index, other.index, sizeof(*this) - sizeof(Node) + partialKeyLen);
|
memcpy(index, other.index, sizeof(*this) - sizeof(Node));
|
||||||
|
memcpy(partialKey(), &other + 1, partialKeyLen);
|
||||||
for (int i = 0; i < numChildren; ++i) {
|
for (int i = 0; i < numChildren; ++i) {
|
||||||
assert(children[i].child->parent == &other);
|
assert(children[i].child->parent == &other);
|
||||||
children[i].child->parent = this;
|
children[i].child->parent = this;
|
||||||
|
|||||||
Reference in New Issue
Block a user