From 63705e373e06cb524b57e44d415d85ca12e95778 Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Mon, 27 Jan 2014 22:34:54 +0100 Subject: [PATCH] Use #pragma pack instead of __attribute__((packed)) This is available on all supported compilers, the attribute does not exist for MSVC REVIEW: 115345 --- src/imageformats/pcx.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/imageformats/pcx.cpp b/src/imageformats/pcx.cpp index e0af73b..5e656ea 100644 --- a/src/imageformats/pcx.cpp +++ b/src/imageformats/pcx.cpp @@ -14,6 +14,8 @@ // #include #include + +#pragma pack(push,1) class RGB { public: @@ -30,7 +32,7 @@ public: return c; } -} Q_PACKED; +}; class Palette { @@ -49,7 +51,7 @@ public: } class RGB rgb[ 16 ]; -} Q_PACKED; +}; class PCXHEADER { @@ -101,7 +103,9 @@ public: // found only in PB IV/IV Plus quint16 VScreenSize; // Vertical screen size in pixels. New field // found only in PB IV/IV Plus -} Q_PACKED; +}; + +#pragma pack(pop) static QDataStream &operator>>(QDataStream &s, RGB &rgb) {