diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-11-12 15:06:38 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-11-15 17:16:24 +0100 |
commit | f9c6a153c95c4acc6ba02e660c6ca51166b4c79a (patch) | |
tree | 685b215018a21a4b826614b4044eecc11221d183 /vcl | |
parent | dc98b788de62ddb25d779e2da3df9a6b539f688f (diff) |
-Werror,-Wdeprecated-anon-enum-enum-conversion
...even though CGBitmapContextCreate is documented to take a mixture of
CGImageAlphaInfo and CGBitmapInfo flags; so convert all to the uint32_t
CGBitmapContextCreate bitmapInfo parameter type
Change-Id: Ic6630c68760fe29b6abf6053e80a852a31349839
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105755
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/quartz/salgdiutils.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/vcl/quartz/salgdiutils.cxx b/vcl/quartz/salgdiutils.cxx index 751b14c94921..985fe38a2d11 100644 --- a/vcl/quartz/salgdiutils.cxx +++ b/vcl/quartz/salgdiutils.cxx @@ -18,6 +18,9 @@ */ #include <sal/config.h> + +#include <cstdint> + #include <sal/log.hxx> #include <basegfx/polygon/b2dpolygon.hxx> @@ -155,14 +158,16 @@ bool AquaSalGraphics::CheckContext() const CGSize aLayerSize = { static_cast<CGFloat>(nScaledWidth), static_cast<CGFloat>(nScaledHeight) }; const int nBytesPerRow = (nBitmapDepth * nScaledWidth) / 8; - int nFlags = kCGImageAlphaNoneSkipFirst | kCGBitmapByteOrder32Host; + std::uint32_t nFlags = std::uint32_t(kCGImageAlphaNoneSkipFirst) + | std::uint32_t(kCGBitmapByteOrder32Host); maBGContextHolder.set(CGBitmapContextCreate( nullptr, nScaledWidth, nScaledHeight, 8, nBytesPerRow, GetSalData()->mxRGBSpace, nFlags)); maLayer.set(CGLayerCreateWithContext(maBGContextHolder.get(), aLayerSize, nullptr)); maLayer.setScale(fScale); - nFlags = kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host; + nFlags = std::uint32_t(kCGImageAlphaPremultipliedFirst) + | std::uint32_t(kCGBitmapByteOrder32Host); maCSContextHolder.set(CGBitmapContextCreate( nullptr, nScaledWidth, nScaledHeight, 8, nBytesPerRow, GetSalData()->mxRGBSpace, nFlags)); |