From c79ea206b8b2a78488aa20e8b440806078c37537 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Sat, 28 Mar 2015 21:02:32 +0100 Subject: loplugin:cstylecast Change-Id: Iffcc1b4fff1293c34f8f8d4eb11465ecb0a873d7 --- sd/source/ui/remotecontrol/BluetoothServer.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sd/source/ui/remotecontrol') diff --git a/sd/source/ui/remotecontrol/BluetoothServer.cxx b/sd/source/ui/remotecontrol/BluetoothServer.cxx index 7a2120b4e5ff..de02dbdbfbe5 100644 --- a/sd/source/ui/remotecontrol/BluetoothServer.cxx +++ b/sd/source/ui/remotecontrol/BluetoothServer.cxx @@ -512,7 +512,7 @@ sal_Int32 OSXBluetoothWrapper::write( const void* pBuffer, sal_uInt32 n ) { SAL_INFO( "sdremote.bluetooth", "OSXBluetoothWrapper::write(" << pBuffer << ", " << n << ") mpChannel=" << mpChannel ); - char* ptr = (char*)pBuffer; + char const * ptr = static_cast(pBuffer); sal_uInt32 nBytesWritten = 0; if (mpChannel == nil) @@ -522,7 +522,7 @@ sal_Int32 OSXBluetoothWrapper::write( const void* pBuffer, sal_uInt32 n ) { int toWrite = n - nBytesWritten; toWrite = toWrite <= mnMTU ? toWrite : mnMTU; - if ( [mpChannel writeSync:ptr length:toWrite] != kIOReturnSuccess ) + if ( [mpChannel writeSync:const_cast(ptr) length:toWrite] != kIOReturnSuccess ) { SAL_INFO( "sdremote.bluetooth", " [mpChannel writeSync:" << (void *) ptr << " length:" << toWrite << "] returned error, total written " << nBytesWritten ); return nBytesWritten; @@ -544,7 +544,7 @@ void OSXBluetoothWrapper::appendData(void* pBuffer, size_t len) ::osl::MutexGuard aQueueGuard( mMutex ); SAL_INFO( "sdremote.bluetooth", "OSXBluetoothWrapper::appendData: entered mutex" ); mBuffer.insert(mBuffer.begin()+mBuffer.size(), - (char*)pBuffer, (char *)pBuffer+len); + static_cast(pBuffer), static_cast(pBuffer)+len); SAL_INFO( "sdremote.bluetooth", " setting mHaveBytes" ); mHaveBytes.set(); SAL_INFO( "sdremote.bluetooth", " leaving mutex" ); @@ -566,7 +566,7 @@ void incomingCallback( void *userRefCon, SAL_INFO( "sdremote.bluetooth", "incomingCallback()" ); - BluetoothServer* pServer = (BluetoothServer*)userRefCon; + BluetoothServer* pServer = static_cast(userRefCon); IOBluetoothRFCOMMChannel* channel = [IOBluetoothRFCOMMChannel withRFCOMMChannelRef:(IOBluetoothRFCOMMChannelRef)objectRef]; -- cgit