Reorder BranchNodeData struct members to make it more compact

By simply putting two bool fields consecutively to each other, we reduce
the number of bytes of padding used from 6 to 2 in a typical 32 bit
build, saving 4 (or 8, in 64 bits) bytes per branch item.
This commit is contained in:
Vadim Zeitlin
2017-12-16 17:30:11 +01:00
parent 51ed404ca5
commit eef994016a

View File

@@ -615,12 +615,12 @@ private:
// Is the branch node currently open (expanded)? // Is the branch node currently open (expanded)?
bool open; bool open;
// By which column are the children currently sorted
int sortColumn;
// Are the children currently sorted ascending or descending // Are the children currently sorted ascending or descending
bool sortAscending; bool sortAscending;
// By which column are the children currently sorted
int sortColumn;
// Total count of expanded (i.e. visible with the help of some // Total count of expanded (i.e. visible with the help of some
// scrolling) items in the subtree, but excluding this node. I.e. it is // scrolling) items in the subtree, but excluding this node. I.e. it is
// 0 for leaves and is the number of rows the subtree occupies for // 0 for leaves and is the number of rows the subtree occupies for