summaryrefslogtreecommitdiff
path: root/include/vcl/salgtype.hxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-01-12 20:10:40 +0100
committerStephan Bergmann <sbergman@redhat.com>2018-01-12 20:10:40 +0100
commit55f07d4daa76503530d96b9c20b53c59bcd5bcf9 (patch)
tree7ad8a720341e38258dab12597d25616c3bff8807 /include/vcl/salgtype.hxx
parente235da515af0e2a5d5a0cf80773943b65fdb8f7b (diff)
More loplugin:cstylecast: vcl
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: I363c01a1ae9e863fca4fb4589829492d7280d711
Diffstat (limited to 'include/vcl/salgtype.hxx')
-rw-r--r--include/vcl/salgtype.hxx8
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