From 9fc0965d1930b32277dd3845cb94b650aec67ac8 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sun, 29 Sep 2013 18:07:23 -0700 Subject: Repack structs with more than one padding hole Sizes gained (measured on 64-bit systems) BezierEase: shrunk 8 bytes QRegExpCharClass: shrunk 8 bytes QRegularExpressionPrivate: shrunk 8 bytes QTimeLinePrivate: shrunk 8 bytes QUtcTimeZonePrivate: shrunk 8 bytes QTextStreamPrivate: shrunk 8 bytes QDirPrivate: shrunk 8 bytes QFileDevicePrivate: shrunk 8 bytes Not done: QRegExpEngine: 18 bytes in 6 holes (you deserve high memory usage if you're still using QRegExp) QTextBoundaryFinder: 8 bytes in 2 holes (public class) QIODevicePrivate: 6 bytes in 2 holes, but there's no gain in packing QProcessPrivate: too complex and my copy is modified QThreadData: awaiting change from Marc Change-Id: I2a388b5ce17dec0dafcef18ed2e80d0379aa7d1e Reviewed-by: Oswald Buddenhagen Reviewed-by: Thiago Macieira --- src/corelib/tools/qeasingcurve.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/corelib/tools/qeasingcurve.cpp') diff --git a/src/corelib/tools/qeasingcurve.cpp b/src/corelib/tools/qeasingcurve.cpp index 5daf067c71..2708901866 100644 --- a/src/corelib/tools/qeasingcurve.cpp +++ b/src/corelib/tools/qeasingcurve.cpp @@ -432,14 +432,14 @@ struct BezierEase : public QEasingCurveFunction qreal p3x, p3y; }; - bool _init; - bool _valid; QVector _curves; - int _curveCount; QVector _intervals; + int _curveCount; + bool _init; + bool _valid; BezierEase() - : QEasingCurveFunction(InOut), _init(false), _valid(false), _curves(10), _intervals(10) + : QEasingCurveFunction(InOut), _curves(10), _intervals(10), _init(false), _valid(false) { } void init() -- cgit v1.2.3