more C++11 specifier
This commit is contained in:
parent
2dece458e4
commit
97be72453b
@ -448,10 +448,9 @@ namespace QskRgbValue
|
|||||||
return toTransparent( QColor( color ), alpha );
|
return toTransparent( QColor( color ), alpha );
|
||||||
}
|
}
|
||||||
|
|
||||||
inline QRgb toTransparent( QRgb rgb, int alpha = 0 )
|
inline constexpr QRgb toTransparent( QRgb rgb, int alpha = 0 ) noexcept
|
||||||
{
|
{
|
||||||
const auto alphaU = static_cast< uint >( alpha );
|
return ( rgb & ColorMask ) | ( ( static_cast< uint >( alpha ) & 0xffu ) << 24 );
|
||||||
return ( rgb & ColorMask ) | ( ( alphaU & 0xffu ) << 24 );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user