diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2013-09-12 14:32:52 -0700 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-13 11:47:06 +0200 |
commit | f4ebb061899da67aa26c08516fa7ee8c7b11dcbf (patch) | |
tree | c7c3e7fc08cfa0b84466cc549818999fe4863605 /src/gui/text/qfontengine_qpa_p.h | |
parent | be8a76cffef8fccab777b8c3a1f7389f229b8e00 (diff) |
Remove Q_PACKED from structures that do not need to be packed
These structures do not need to be packed. With some compilers, Q_PACKED
was defined to be empty, which means that the code was working fine
without packing. Or there were some lingering problems on those
platforms (MSVC) and we're now exposing them in all platforms.
Actually, it shouldn't be a problem anywhere. QCharAttributes, quint24
and QFontEngineQPA::Glyph have only char/uchar members, so they're
packed already (they have alignof == 1). The only platform where that
wasn't true was ARM OABI, which we don't support anymore.
QFontEngineQPA::Header seems to always come from a QByteArray, so it
doesn't neeed to be packed either. However, just to be sure, I'm
inserting a check for alignment.
And QFontEngineQPA::Block isn't used anywhere.
Change-Id: Iacfa25edf336ef2a03aeb6e40ae90937a21661ae
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Diffstat (limited to 'src/gui/text/qfontengine_qpa_p.h')
-rw-r--r-- | src/gui/text/qfontengine_qpa_p.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/text/qfontengine_qpa_p.h b/src/gui/text/qfontengine_qpa_p.h index 5fbdafdf56..c8b40abd7f 100644 --- a/src/gui/text/qfontengine_qpa_p.h +++ b/src/gui/text/qfontengine_qpa_p.h @@ -131,7 +131,7 @@ public: GlyphBlock }; - struct Q_PACKED Header + struct Header { char magic[4]; // 'QPF2' quint32 lock; // values: 0 = unlocked, 0xffffffff = read-only, otherwise qws client id of locking process @@ -140,14 +140,14 @@ public: quint16 dataSize; }; - struct Q_PACKED Block + struct Block { quint16 tag; quint16 pad; quint32 dataSize; }; - struct Q_PACKED Glyph + struct Glyph { quint8 width; quint8 height; |