Use #pragma pack instead of __attribute__((packed))

This is available on all supported compilers, the attribute does not exist
for MSVC

REVIEW: 115345
This commit is contained in:
Alex Richardson 2014-01-27 22:34:54 +01:00
parent a533bcd418
commit 63705e373e

View File

@ -14,6 +14,8 @@
// #include <QDebug> // #include <QDebug>
#include <QImage> #include <QImage>
#pragma pack(push,1)
class RGB class RGB
{ {
public: public:
@ -30,7 +32,7 @@ public:
return c; return c;
} }
} Q_PACKED; };
class Palette class Palette
{ {
@ -49,7 +51,7 @@ public:
} }
class RGB rgb[ 16 ]; class RGB rgb[ 16 ];
} Q_PACKED; };
class PCXHEADER class PCXHEADER
{ {
@ -101,7 +103,9 @@ public:
// found only in PB IV/IV Plus // found only in PB IV/IV Plus
quint16 VScreenSize; // Vertical screen size in pixels. New field quint16 VScreenSize; // Vertical screen size in pixels. New field
// found only in PB IV/IV Plus // found only in PB IV/IV Plus
} Q_PACKED; };
#pragma pack(pop)
static QDataStream &operator>>(QDataStream &s, RGB &rgb) static QDataStream &operator>>(QDataStream &s, RGB &rgb)
{ {