QPixelFormat: implement some oneliners in the class body
There's little point in duplicating the complex declaration (thanks to C++11), just define the relational operators and the default ctor where they're declared. Change-Id: Ie91545b2581c89edd434c911eb05705e2d16debe Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
This commit is contained in:
parent
3469c262fc
commit
d131abde59
@ -159,7 +159,7 @@ public:
|
||||
CurrentSystemEndian
|
||||
};
|
||||
|
||||
Q_DECL_CONSTEXPR inline QPixelFormat() Q_DECL_NOTHROW;
|
||||
Q_DECL_CONSTEXPR inline QPixelFormat() Q_DECL_NOTHROW : data(0) {}
|
||||
Q_DECL_CONSTEXPR inline QPixelFormat(ColorModel colorModel,
|
||||
uchar firstSize,
|
||||
uchar secondSize,
|
||||
@ -221,8 +221,11 @@ private:
|
||||
private:
|
||||
quint64 data;
|
||||
|
||||
friend Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline bool operator==(const QPixelFormat &fmt1, const QPixelFormat &fmt2);
|
||||
friend Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline bool operator!=(const QPixelFormat &fmt1, const QPixelFormat &fmt2);
|
||||
friend Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline bool operator==(const QPixelFormat &fmt1, const QPixelFormat &fmt2)
|
||||
{ return fmt1.data == fmt2.data; }
|
||||
|
||||
friend Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline bool operator!=(const QPixelFormat &fmt1, const QPixelFormat &fmt2)
|
||||
{ return !(fmt1 == fmt2); }
|
||||
};
|
||||
Q_STATIC_ASSERT(sizeof(QPixelFormat) == sizeof(quint64));
|
||||
Q_DECLARE_TYPEINFO(QPixelFormat, Q_PRIMITIVE_TYPE);
|
||||
@ -304,12 +307,6 @@ public:
|
||||
ByteOrder byteOrder = LittleEndian);
|
||||
};
|
||||
|
||||
Q_DECL_CONSTEXPR
|
||||
QPixelFormat::QPixelFormat() Q_DECL_NOTHROW
|
||||
: data(0)
|
||||
{
|
||||
}
|
||||
|
||||
Q_DECL_CONSTEXPR
|
||||
QPixelFormat::QPixelFormat(ColorModel mdl,
|
||||
uchar firstSize,
|
||||
@ -341,12 +338,6 @@ QPixelFormat::QPixelFormat(ColorModel mdl,
|
||||
{
|
||||
}
|
||||
|
||||
Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline bool operator==(const QPixelFormat &fmt1, const QPixelFormat &fmt2)
|
||||
{ return fmt1.data == fmt2.data; }
|
||||
|
||||
Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline bool operator!=(const QPixelFormat &fmt1, const QPixelFormat &fmt2)
|
||||
{ return !(fmt1 == fmt2); }
|
||||
|
||||
Q_DECL_CONSTEXPR
|
||||
QPixelFormatRgb::QPixelFormatRgb(uchar red,
|
||||
uchar green,
|
||||
|
Loading…
Reference in New Issue
Block a user