mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2025-06-03 17:08:08 -04:00
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:
parent
a533bcd418
commit
63705e373e
@ -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)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user