diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-10-04 10:04:12 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-10-04 16:39:06 +0200 |
commit | c3c88d6bbe4109fcf1a6d53e947faec775c96e42 (patch) | |
tree | 65a8364b451cbeaa49cec03fcebaf54ce35741ac /vcl/osx | |
parent | 1346d0c125c35094d241bbc1e0e0316433a292aa (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/osx')
-rw-r--r-- | vcl/osx/salinst.cxx | 2 | ||||
-rw-r--r-- | vcl/osx/salprn.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx index 426aa2972ec6..46a52bd9b213 100644 --- a/vcl/osx/salinst.cxx +++ b/vcl/osx/salinst.cxx @@ -953,7 +953,7 @@ NSImage* CreateNSImage( const Image& rImage ) { [pImage lockFocusFlipped:YES]; NSGraphicsContext* pContext = [NSGraphicsContext currentContext]; - CGContextRef rCGContext = static_cast<CGContextRef>([pContext graphicsPort]); + CGContextRef rCGContext = [pContext CGContext]; const CGRect aDstRect = { {0, 0}, { static_cast<CGFloat>(aSize.Width()), static_cast<CGFloat>(aSize.Height()) } }; CGContextDrawImage( rCGContext, aDstRect, xImage ); diff --git a/vcl/osx/salprn.cxx b/vcl/osx/salprn.cxx index 7fdd072e836f..34f8cbb60e26 100644 --- a/vcl/osx/salprn.cxx +++ b/vcl/osx/salprn.cxx @@ -547,7 +547,7 @@ SalGraphics* AquaSalInfoPrinter::StartPage( ImplJobSetup* i_pSetupData, bool i_b if( i_bNewJobData && i_pSetupData ) SetPrinterData( i_pSetupData ); - CGContextRef rContext = static_cast<CGContextRef>([[NSGraphicsContext currentContext] graphicsPort]); + CGContextRef rContext = [[NSGraphicsContext currentContext] CGContext]; SetupPrinterGraphics( rContext ); |