satisfying clang pedantic checks

This commit is contained in:
Uwe Rathmann 2017-12-07 17:28:23 +01:00
parent a122b19df0
commit 5a8d633239

View File

@ -439,7 +439,8 @@ QSK_RGB_VALUES
inline QColor toTransparent( const QColor& c1, int alpha = 0 )
{
return QColor::fromRgba( ( c1.rgb() & ColorMask ) | ( ( alpha & 0xffu ) << 24 ) );
const auto alphaU = static_cast< uint >( alpha );
return QColor::fromRgba( ( c1.rgb() & ColorMask ) | ( ( alphaU & 0xffu ) << 24 ) );
}
inline QColor toTransparent( Qt::GlobalColor color, int alpha = 0 )
@ -449,7 +450,8 @@ QSK_RGB_VALUES
inline QRgb toTransparent( QRgb rgb, int alpha = 0 )
{
return ( rgb & ColorMask ) | ( ( alpha & 0xffu ) << 24 );
const auto alphaU = static_cast< uint >( alpha );
return ( rgb & ColorMask ) | ( ( alphaU & 0xffu ) << 24 );
}
}