diff --git a/ConflictSet.cpp b/ConflictSet.cpp index b21b307..3d7b59c 100644 --- a/ConflictSet.cpp +++ b/ConflictSet.cpp @@ -173,10 +173,6 @@ constexpr static int kPartialKeyMaxLenEntryPresent = 24; struct Node { /* begin section that's copied to the next node */ - bool entryPresent = false; - uint8_t parentsIndex = 0; - int8_t partialKeyLen = 0; - int32_t numChildren = 0; Node *parent = nullptr; union { uint8_t partialKey[kPartialKeyMaxLenEntryPresent + sizeof(Entry)]; @@ -185,12 +181,16 @@ struct Node { Entry entry; }; }; + int32_t partialKeyLen = 0; + int16_t numChildren : 15 = 0; + bool entryPresent : 1 = false; + uint8_t parentsIndex = 0; /* end section that's copied to the next node */ Type type; }; -constexpr int kNodeCopyBegin = offsetof(Node, entryPresent); +constexpr int kNodeCopyBegin = offsetof(Node, parent); constexpr int kNodeCopySize = offsetof(Node, type) - kNodeCopyBegin; static_assert(offsetof(Node, entry) ==