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 <QImage>
#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)
{