From eef994016a204df7d136ea4f5e9c43f444529871 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 16 Dec 2017 17:30:11 +0100 Subject: [PATCH] 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. --- src/generic/datavgen.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index f62622acaa..b4a993f888 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -615,12 +615,12 @@ private: // Is the branch node currently open (expanded)? bool open; - // By which column are the children currently sorted - int sortColumn; - // Are the children currently sorted ascending or descending bool sortAscending; + // By which column are the children currently sorted + int sortColumn; + // 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 // 0 for leaves and is the number of rows the subtree occupies for