diff options
Diffstat (limited to 'include/vcl/salgtype.hxx')
-rw-r--r-- | include/vcl/salgtype.hxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/vcl/salgtype.hxx b/include/vcl/salgtype.hxx index df708b4fe196..51f81d6c737b 100644 --- a/include/vcl/salgtype.hxx +++ b/include/vcl/salgtype.hxx @@ -38,10 +38,10 @@ constexpr SalColor MAKE_SALCOLOR(sal_uInt8 r, sal_uInt8 g, sal_uInt8 b) { return sal_uInt32(b) | (sal_uInt32(g) << 8) | (sal_uInt32(r) << 16); } -#define SALCOLOR_RED( n ) ((sal_uInt8)((n)>>16)) -#define SALCOLOR_GREEN( n ) ((sal_uInt8)(((sal_uInt16)(n)) >> 8)) -#define SALCOLOR_BLUE( n ) ((sal_uInt8)(n)) -#define SALCOLOR_NONE (~(SalColor)0) +#define SALCOLOR_RED( n ) (static_cast<sal_uInt8>((n)>>16)) +#define SALCOLOR_GREEN( n ) (static_cast<sal_uInt8>((static_cast<sal_uInt16>(n)) >> 8)) +#define SALCOLOR_BLUE( n ) (static_cast<sal_uInt8>(n)) +#define SALCOLOR_NONE (~SalColor(0)) // must equal to class Point struct SalPoint |