Reorder member variables to avoid padding.

Saves 8 byte in each case on 64bit systems, no change on 32bit systems.

Change-Id: I2a2e8786fc7914ee9ae369ba05bedfc9e5e0ca5c
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This commit is contained in:
Volker Krause 2015-05-11 10:45:38 +02:00
parent a4cba90e19
commit 7d1ec1ae9e
5 changed files with 8 additions and 8 deletions

View File

@ -972,8 +972,8 @@ struct QMessagePattern {
QElapsedTimer timer;
#endif
#ifdef QLOGGING_HAVE_BACKTRACE
int backtraceDepth;
QString backtraceSeparator;
int backtraceDepth;
#endif
bool fromEnvironment;
@ -986,8 +986,8 @@ QMessagePattern::QMessagePattern()
: literals(0)
, tokens(0)
#ifdef QLOGGING_HAVE_BACKTRACE
, backtraceDepth(5)
, backtraceSeparator(QLatin1Char('|'))
, backtraceDepth(5)
#endif
, fromEnvironment(false)
{

View File

@ -53,12 +53,12 @@ QMimeTypePrivate::QMimeTypePrivate()
{}
QMimeTypePrivate::QMimeTypePrivate(const QMimeType &other)
: name(other.d->name),
: loaded(other.d->loaded),
name(other.d->name),
localeComments(other.d->localeComments),
genericIconName(other.d->genericIconName),
iconName(other.d->iconName),
globPatterns(other.d->globPatterns),
loaded(other.d->loaded)
globPatterns(other.d->globPatterns)
{}
void QMimeTypePrivate::clear()

View File

@ -66,12 +66,12 @@ public:
void addGlobPattern(const QString &pattern);
bool loaded; // QSharedData leaves a 4 byte gap, so don't put 8 byte members first
QString name;
LocaleHash localeComments;
QString genericIconName;
QString iconName;
QStringList globPatterns;
bool loaded;
};
QT_END_NAMESPACE

View File

@ -61,8 +61,8 @@ public:
void unregister();
void maybeRegister();
bool registered;
QObject *object;
bool registered;
QEvent::Type eventType;
};

View File

@ -103,8 +103,8 @@ public:
QAbstractState *initialState;
QState::ChildMode childMode;
mutable bool childStatesListNeedsRefresh;
mutable QList<QAbstractState*> childStatesList;
mutable bool transitionsListNeedsRefresh;
mutable QList<QAbstractState*> childStatesList;
mutable QList<QAbstractTransition*> transitionsList;
#ifndef QT_NO_PROPERTIES