No & is a bit faster here

This commit is contained in:
Albert Astals Cid 2019-03-08 15:18:35 +01:00
parent 26b796f67d
commit 35e64c44d8
2 changed files with 3 additions and 3 deletions

View File

@ -23,7 +23,7 @@ public:
quint8 g;
quint8 b;
static RGB from(const QRgb &color)
static RGB from(const QRgb color)
{
RGB c;
c.r = qRed(color);
@ -169,7 +169,7 @@ static QDataStream &operator>>(QDataStream &s, PCXHEADER &ph)
return s;
}
static QDataStream &operator<<(QDataStream &s, const RGB &rgb)
static QDataStream &operator<<(QDataStream &s, const RGB rgb)
{
s << rgb.r << rgb.g << rgb.b;

View File

@ -276,7 +276,7 @@ const XCFImageFormat::LayerModes XCFImageFormat::layer_modes[] = {
};
//! Change a QRgb value's alpha only.
inline QRgb qRgba(const QRgb &rgb, int a)
inline QRgb qRgba(const QRgb rgb, int a)
{
return ((a & 0xff) << 24 | (rgb & RGB_MASK));
}