diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-03-31 13:17:42 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-03-31 13:17:42 +0200 |
commit | 62e798c4a520a8b96e9113e363b1f26767231636 (patch) | |
tree | 7e0003b646bd68af83443890244dec1371499de7 /vcl/source | |
parent | 9676efca531290ebde3839c5246abdde159499cf (diff) |
Reduce to static_cast any reinterpret_cast from void pointers
Change-Id: I65d76524847b57dcb17ee3f66e156ec1fd51b239
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/components/factory.cxx | 2 | ||||
-rw-r--r-- | vcl/source/control/button.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/bitmapex.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/font.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/regionband.cxx | 2 | ||||
-rw-r--r-- | vcl/source/opengl/OpenGLContext.cxx | 4 | ||||
-rw-r--r-- | vcl/source/window/syschild.cxx | 2 |
8 files changed, 9 insertions, 9 deletions
diff --git a/vcl/source/components/factory.cxx b/vcl/source/components/factory.cxx index e2adb731b48e..403232c0c91f 100644 --- a/vcl/source/components/factory.cxx +++ b/vcl/source/components/factory.cxx @@ -43,7 +43,7 @@ extern "C" { if( pXUnoSMgr ) { Reference< ::com::sun::star::lang::XMultiServiceFactory > xMgr( - reinterpret_cast< ::com::sun::star::lang::XMultiServiceFactory* >( pXUnoSMgr ) + static_cast< ::com::sun::star::lang::XMultiServiceFactory* >( pXUnoSMgr ) ); Reference< ::com::sun::star::lang::XSingleServiceFactory > xFactory; if( vcl_session_getImplementationName().equalsAscii( pImplementationName ) ) diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index 37c78ae08e85..1e6c2e5fcd22 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -595,7 +595,7 @@ bool Button::set_property(const OString &rKey, const OString &rValue) sal_IntPtr Button::dispatchCommandHandler(void *, void *pCaller) { - const Button *pButton = reinterpret_cast<Button*>(pCaller); + const Button *pButton = static_cast<Button*>(pCaller); if (pButton == NULL) return 0; diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx index ab451c3f81bc..7782bd473134 100644 --- a/vcl/source/gdi/bitmapex.cxx +++ b/vcl/source/gdi/bitmapex.cxx @@ -801,7 +801,7 @@ bool BitmapEx::Create( const ::com::sun::star::uno::Reference< { // 0 means get BitmapEx uno::Any aAny = xFastPropertySet->getFastPropertyValue( 0 ); - std::unique_ptr<BitmapEx> xBitmapEx(reinterpret_cast<BitmapEx*>( *reinterpret_cast<const sal_Int64*>(aAny.getValue()))); + std::unique_ptr<BitmapEx> xBitmapEx(reinterpret_cast<BitmapEx*>( *static_cast<const sal_Int64*>(aAny.getValue()))); if( xBitmapEx ) { *this = *xBitmapEx; diff --git a/vcl/source/gdi/font.cxx b/vcl/source/gdi/font.cxx index fb7d1368672d..8e3be59283a7 100644 --- a/vcl/source/gdi/font.cxx +++ b/vcl/source/gdi/font.cxx @@ -944,7 +944,7 @@ Font Font::identifyFont( const void* i_pBuffer, sal_uInt32 i_nSize ) Font aResult; if( ! identifyTrueTypeFont( i_pBuffer, i_nSize, aResult ) ) { - const char* pStream = reinterpret_cast<const char*>(i_pBuffer); + const char* pStream = static_cast<const char*>(i_pBuffer); if( pStream && i_nSize > 100 && *pStream == '%' && pStream[1] == '!' ) { diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index f62fa731ecb2..a85e7515e513 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -6390,7 +6390,7 @@ const SEC_ASN1Template Accuracy_Template[] = size_t AppendToBuffer(char *ptr, size_t size, size_t nmemb, void *userdata) { - OStringBuffer *pBuffer = reinterpret_cast<OStringBuffer*>(userdata); + OStringBuffer *pBuffer = static_cast<OStringBuffer*>(userdata); pBuffer->append(ptr, size*nmemb); return size*nmemb; diff --git a/vcl/source/gdi/regionband.cxx b/vcl/source/gdi/regionband.cxx index 0ef5034076b6..24740920f2ff 100644 --- a/vcl/source/gdi/regionband.cxx +++ b/vcl/source/gdi/regionband.cxx @@ -1277,7 +1277,7 @@ sal_uInt32 RegionBand::getRectangleCount() const #ifdef DBG_UTIL const char* ImplDbgTestRegionBand(const void* pObj) { - const RegionBand* pRegionBand = reinterpret_cast< const RegionBand* >(pObj); + const RegionBand* pRegionBand = static_cast< const RegionBand* >(pObj); if(pRegionBand) { diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx index ec1b255eb454..18457163e660 100644 --- a/vcl/source/opengl/OpenGLContext.cxx +++ b/vcl/source/opengl/OpenGLContext.cxx @@ -1157,7 +1157,7 @@ bool OpenGLContext::initWindow() m_pChildWindow->SetControlForeground(); m_pChildWindow->SetControlBackground(); - m_aGLWin.dpy = reinterpret_cast<Display*>(pChildSysData->pDisplay); + m_aGLWin.dpy = static_cast<Display*>(pChildSysData->pDisplay); m_aGLWin.win = pChildSysData->aWindow; m_aGLWin.screen = pChildSysData->nScreen; @@ -1292,7 +1292,7 @@ SystemWindowData OpenGLContext::generateWinData(vcl::Window* pParent, bool) #if !defined(LIBO_HEADLESS) const SystemEnvData* sysData(pParent->GetSystemData()); - Display *dpy = reinterpret_cast<Display*>(sysData->pDisplay); + Display *dpy = static_cast<Display*>(sysData->pDisplay); Window win = sysData->aWindow; if( dpy == 0 || !glXQueryExtension( dpy, NULL, NULL ) ) diff --git a/vcl/source/window/syschild.cxx b/vcl/source/window/syschild.cxx index 50bdd7e0ba08..f82e274d3c12 100644 --- a/vcl/source/window/syschild.cxx +++ b/vcl/source/window/syschild.cxx @@ -158,7 +158,7 @@ void SystemChildWindow::EnableEraseBackground( bool bEnable ) void SystemChildWindow::ImplTestJavaException( void* pEnv ) { #if HAVE_FEATURE_JAVA - JNIEnv* pJavaEnv = reinterpret_cast< JNIEnv* >( pEnv ); + JNIEnv* pJavaEnv = static_cast< JNIEnv* >( pEnv ); jthrowable jtThrowable = pJavaEnv->ExceptionOccurred(); if( jtThrowable ) |