summaryrefslogtreecommitdiff
path: root/vcl/quartz
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-10-04 10:04:12 +0200
committerStephan Bergmann <sbergman@redhat.com>2018-10-04 16:39:06 +0200
commitc3c88d6bbe4109fcf1a6d53e947faec775c96e42 (patch)
tree65a8364b451cbeaa49cec03fcebaf54ce35741ac /vcl/quartz
parent1346d0c125c35094d241bbc1e0e0316433a292aa (diff)
loplugin:redundantcast
"static_cast from 'CGContextRef' (aka 'CGContext *') prvalue to 'CGContextRef' (aka 'CGContext *') prvalue is redundant" with --with-macosx-version-min-required=10.14 at least. (Not exactly sure why this warning only starts to appear now. Presumably something changed in the system headers. Lets see whether older baseline builds are happy with the dropped casts, too.) Change-Id: Id52d1891e5e33f7c37d095440339980b4000ca4e Reviewed-on: https://gerrit.libreoffice.org/61353 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl/quartz')
-rw-r--r--vcl/quartz/salgdiutils.cxx4
-rw-r--r--vcl/quartz/salvd.cxx2
2 files changed, 3 insertions, 3 deletions
diff --git a/vcl/quartz/salgdiutils.cxx b/vcl/quartz/salgdiutils.cxx
index 7e0562b0fed2..22a2ad041f65 100644
--- a/vcl/quartz/salgdiutils.cxx
+++ b/vcl/quartz/salgdiutils.cxx
@@ -118,7 +118,7 @@ bool AquaSalGraphics::CheckContext()
{
const CGSize aLayerSize = { static_cast<CGFloat>(nWidth), static_cast<CGFloat>(nHeight) };
NSGraphicsContext* pNSGContext = [NSGraphicsContext graphicsContextWithWindow: mpFrame->getNSWindow()];
- CGContextRef xCGContext = static_cast<CGContextRef>([pNSGContext graphicsPort]);
+ CGContextRef xCGContext = [pNSGContext CGContext];
mxLayer = CGLayerCreateWithContext( xCGContext, aLayerSize, nullptr );
SAL_INFO( "vcl.cg", "CGLayerCreateWithContext(" << xCGContext << "," << aLayerSize << ",NULL) = " << mxLayer );
if( mxLayer )
@@ -192,7 +192,7 @@ void AquaSalGraphics::UpdateWindow( NSRect& )
NSGraphicsContext* pContext = [NSGraphicsContext currentContext];
if( (mxLayer != nullptr) && (pContext != nullptr) )
{
- CGContextRef rCGContext = static_cast<CGContextRef>([pContext graphicsPort]);
+ CGContextRef rCGContext = [pContext CGContext];
SAL_INFO( "vcl.cg", "[[NSGraphicsContext currentContext] graphicsPort] = " << rCGContext );
CGMutablePathRef rClip = mpFrame->getClipPath();
diff --git a/vcl/quartz/salvd.cxx b/vcl/quartz/salvd.cxx
index 4f7c41acc38e..7b3c68155ffe 100644
--- a/vcl/quartz/salvd.cxx
+++ b/vcl/quartz/salvd.cxx
@@ -270,7 +270,7 @@ bool AquaSalVirtualDevice::SetSize( long nDX, long nDY )
NSGraphicsContext* pNSContext = [NSGraphicsContext graphicsContextWithWindow: pNSWindow];
if( pNSContext )
{
- xCGContext = static_cast<CGContextRef>([pNSContext graphicsPort]);
+ xCGContext = [pNSContext CGContext];
}
}
else