diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-03-28 19:00:39 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-03-28 19:09:19 +0100 |
commit | c30ad3771eaa0d6636156b99a3451f1723013eea (patch) | |
tree | 87cc886eaec450876f53e6ad19a4d76c1122126f /desktop | |
parent | 02cad1c90541067668fd0875589e7757e3241f90 (diff) |
Clean up C-style casts from pointers to void
Change-Id: Idb32372009faf2bc2e223f1f8977cb3fc6b182a3
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/app/officeipcthread.cxx | 6 | ||||
-rw-r--r-- | desktop/source/lib/init.cxx | 4 | ||||
-rw-r--r-- | desktop/source/offacc/acceptor.cxx | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx index c5f2367ca24a..eaffa629ea84 100644 --- a/desktop/source/app/officeipcthread.cxx +++ b/desktop/source/app/officeipcthread.cxx @@ -291,15 +291,15 @@ public: IMPL_STATIC_LINK_NOINSTANCE( ProcessEventsClass_Impl, CallEvent, void*, pEvent ) { // Application events are processed by the Desktop::HandleAppEvent implementation. - Desktop::HandleAppEvent( *((ApplicationEvent*)pEvent) ); - delete (ApplicationEvent*)pEvent; + Desktop::HandleAppEvent( *static_cast<ApplicationEvent*>(pEvent) ); + delete static_cast<ApplicationEvent*>(pEvent); return 0; } IMPL_STATIC_LINK_NOINSTANCE( ProcessEventsClass_Impl, ProcessDocumentsEvent, void*, pEvent ) { // Documents requests are processed by the OfficeIPCThread implementation - ProcessDocumentsRequest* pDocsRequest = (ProcessDocumentsRequest*)pEvent; + ProcessDocumentsRequest* pDocsRequest = static_cast<ProcessDocumentsRequest*>(pEvent); if ( pDocsRequest ) { diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 07cad8a81004..e137cb11f9c7 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -540,7 +540,7 @@ static char* doc_getPartName(LibreOfficeKitDocument* pThis, int nPart) OUString sName = pDoc->getPartName( nPart ); OString aString = OUStringToOString(sName, RTL_TEXTENCODING_UTF8); - char* pMemory = (char*) malloc(aString.getLength() + 1); + char* pMemory = static_cast<char*>(malloc(aString.getLength() + 1)); strcpy(pMemory, aString.getStr()); return pMemory; @@ -768,7 +768,7 @@ static char* lo_getError (LibreOfficeKit *pThis) { LibLibreOffice_Impl* pLib = static_cast<LibLibreOffice_Impl*>(pThis); OString aString = OUStringToOString(pLib->maLastExceptionMsg, RTL_TEXTENCODING_UTF8); - char* pMemory = (char*) malloc(aString.getLength() + 1); + char* pMemory = static_cast<char*>(malloc(aString.getLength() + 1)); strcpy(pMemory, aString.getStr()); return pMemory; } diff --git a/desktop/source/offacc/acceptor.cxx b/desktop/source/offacc/acceptor.cxx index a84672904a0d..f533be2882c2 100644 --- a/desktop/source/offacc/acceptor.cxx +++ b/desktop/source/offacc/acceptor.cxx @@ -40,7 +40,7 @@ extern "C" void offacc_workerfunc (void * acc) { osl_setThreadName("URP Acceptor"); - ((Acceptor*)acc)->run(); + static_cast<Acceptor*>(acc)->run(); } Acceptor::Acceptor( const Reference< XComponentContext >& rxContext ) |