diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-04-02 19:43:15 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-04-02 19:43:15 +0200 |
commit | 4c449bc71224aa4055b9122275885951a39605db (patch) | |
tree | 5c7e59df02a1b52ef0ab796641980ae8e1b4e021 | |
parent | f4796210b4955019a4f51b29549646fa067e9ae8 (diff) |
loplugin:redundantcast
Change-Id: I6095d1209f2339387e8562074daa32779089a018
-rw-r--r-- | vcl/osx/DataFlavorMapping.cxx | 2 | ||||
-rw-r--r-- | vcl/osx/salinst.cxx | 2 | ||||
-rw-r--r-- | vcl/osx/salprn.cxx | 6 | ||||
-rw-r--r-- | vcl/quartz/salgdiutils.cxx | 4 | ||||
-rw-r--r-- | vcl/quartz/salvd.cxx | 2 | ||||
-rw-r--r-- | vcl/quartz/utils.cxx | 2 |
6 files changed, 9 insertions, 9 deletions
diff --git a/vcl/osx/DataFlavorMapping.cxx b/vcl/osx/DataFlavorMapping.cxx index 60804fee90cd..cf7d527ca4e5 100644 --- a/vcl/osx/DataFlavorMapping.cxx +++ b/vcl/osx/DataFlavorMapping.cxx @@ -216,7 +216,7 @@ Any UniDataProvider::getOOoData() if (mSystemData) { - oOOData = makeAny(OUString(reinterpret_cast<const sal_Char*>([mSystemData bytes]), + oOOData = makeAny(OUString(static_cast<const sal_Char*>([mSystemData bytes]), [mSystemData length], RTL_TEXTENCODING_UTF8)); } diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx index fc8e9e474f66..2f061cbbcc13 100644 --- a/vcl/osx/salinst.cxx +++ b/vcl/osx/salinst.cxx @@ -1057,7 +1057,7 @@ NSImage* CreateNSImage( const Image& rImage ) { [pImage lockFocusFlipped:YES]; NSGraphicsContext* pContext = [NSGraphicsContext currentContext]; - CGContextRef rCGContext = reinterpret_cast<CGContextRef>([pContext graphicsPort]); + CGContextRef rCGContext = static_cast<CGContextRef>([pContext graphicsPort]); 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 db138ef7f3c3..0becb853426a 100644 --- a/vcl/osx/salprn.cxx +++ b/vcl/osx/salprn.cxx @@ -78,7 +78,7 @@ AquaSalInfoPrinter::AquaSalInfoPrinter( const SalPrinterQueueInfo& i_rQueue ) : mpGraphics = new AquaSalGraphics(); const int nWidth = 100, nHeight = 100; - maContextMemory.reset( reinterpret_cast<sal_uInt8*>( rtl_allocateMemory( nWidth * 4 * nHeight ) ), + maContextMemory.reset( static_cast<sal_uInt8*>( rtl_allocateMemory( nWidth * 4 * nHeight ) ), boost::bind( rtl_freeMemory, _1 ) ); if( maContextMemory ) @@ -193,7 +193,7 @@ bool AquaSalInfoPrinter::SetPrinterData( ImplJobSetup* io_pSetupData ) io_pSetupData->meOrientation = mePageOrientation; io_pSetupData->mnPaperBin = 0; - io_pSetupData->mpDriverData = reinterpret_cast<sal_uInt8*>(rtl_allocateMemory( 4 )); + io_pSetupData->mpDriverData = static_cast<sal_uInt8*>(rtl_allocateMemory( 4 )); io_pSetupData->mnDriverDataLen = 4; } else @@ -550,7 +550,7 @@ SalGraphics* AquaSalInfoPrinter::StartPage( ImplJobSetup* i_pSetupData, bool i_b if( i_bNewJobData && i_pSetupData ) SetPrinterData( i_pSetupData ); - CGContextRef rContext = reinterpret_cast<CGContextRef>([[NSGraphicsContext currentContext] graphicsPort]); + CGContextRef rContext = static_cast<CGContextRef>([[NSGraphicsContext currentContext] graphicsPort]); SetupPrinterGraphics( rContext ); diff --git a/vcl/quartz/salgdiutils.cxx b/vcl/quartz/salgdiutils.cxx index 403651b39116..87bc282559e2 100644 --- a/vcl/quartz/salgdiutils.cxx +++ b/vcl/quartz/salgdiutils.cxx @@ -116,7 +116,7 @@ bool AquaSalGraphics::CheckContext() { const CGSize aLayerSize = { static_cast<CGFloat>(nWidth), static_cast<CGFloat>(nHeight) }; NSGraphicsContext* pNSGContext = [NSGraphicsContext graphicsContextWithWindow: mpFrame->getNSWindow()]; - CGContextRef xCGContext = reinterpret_cast<CGContextRef>([pNSGContext graphicsPort]); + CGContextRef xCGContext = static_cast<CGContextRef>([pNSGContext graphicsPort]); mxLayer = CGLayerCreateWithContext( xCGContext, aLayerSize, NULL ); CG_TRACE( "CGLayerCreateWithContext(" << xCGContext << "," << aLayerSize << ",NULL) = " << mxLayer ); if( mxLayer ) @@ -180,7 +180,7 @@ void AquaSalGraphics::UpdateWindow( NSRect& ) NSGraphicsContext* pContext = [NSGraphicsContext currentContext]; if( (mxLayer != NULL) && (pContext != NULL) ) { - CGContextRef rCGContext = reinterpret_cast<CGContextRef>([pContext graphicsPort]); + CGContextRef rCGContext = static_cast<CGContextRef>([pContext graphicsPort]); CG_TRACE( "[[NSGraphicsContext currentContext] graphicsPort] = " << rCGContext ); CGMutablePathRef rClip = mpFrame->getClipPath(); diff --git a/vcl/quartz/salvd.cxx b/vcl/quartz/salvd.cxx index 6a6426ceb86c..ae25748dfa12 100644 --- a/vcl/quartz/salvd.cxx +++ b/vcl/quartz/salvd.cxx @@ -236,7 +236,7 @@ bool AquaSalVirtualDevice::SetSize( long nDX, long nDY ) { NSGraphicsContext* pNSContext = [NSGraphicsContext graphicsContextWithWindow: pNSWindow]; if( pNSContext ) - xCGContext = reinterpret_cast<CGContextRef>([pNSContext graphicsPort]); + xCGContext = static_cast<CGContextRef>([pNSContext graphicsPort]); } else { diff --git a/vcl/quartz/utils.cxx b/vcl/quartz/utils.cxx index 1ed6a5141df0..309859085a37 100644 --- a/vcl/quartz/utils.cxx +++ b/vcl/quartz/utils.cxx @@ -35,7 +35,7 @@ OUString GetOUString( CFStringRef rStr ) const UniChar* pConstStr = CFStringGetCharactersPtr( rStr ); if( pConstStr ) return OUString( pConstStr, nLength ); - UniChar* pStr = reinterpret_cast<UniChar*>( rtl_allocateMemory( sizeof(UniChar)*nLength ) ); + UniChar* pStr = static_cast<UniChar*>( rtl_allocateMemory( sizeof(UniChar)*nLength ) ); CFRange aRange = { 0, nLength }; CFStringGetCharacters( rStr, aRange, pStr ); OUString aRet( pStr, nLength ); |