Kaydet (Commit) be44ec8c authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Reduce to static_cast any reinterpret_cast from void pointers

Change-Id: I4df86baf0106283c78942c40a4b5830dd9c91195
üst 90da412b
...@@ -290,7 +290,7 @@ const Any& SAL_CALL CachedContentResultSet::CCRS_Cache ...@@ -290,7 +290,7 @@ const Any& SAL_CALL CachedContentResultSet::CCRS_Cache
m_xContentIdentifierMapping.clear(); m_xContentIdentifierMapping.clear();
} }
const Sequence< Any >& rRow = const Sequence< Any >& rRow =
(* reinterpret_cast< const Sequence< Any > * > (* static_cast< const Sequence< Any > * >
(getRowAny( nRow ).getValue() )); (getRowAny( nRow ).getValue() ));
if( nColumnIndex > rRow.getLength() ) if( nColumnIndex > rRow.getLength() )
...@@ -312,7 +312,7 @@ const OUString& SAL_CALL CachedContentResultSet::CCRS_Cache ...@@ -312,7 +312,7 @@ const OUString& SAL_CALL CachedContentResultSet::CCRS_Cache
rRow <<= m_xContentIdentifierMapping->mapContentIdentifierString( aValue ); rRow <<= m_xContentIdentifierMapping->mapContentIdentifierString( aValue );
remindMapped( nRow ); remindMapped( nRow );
} }
return (* reinterpret_cast< const OUString * > return (* static_cast< const OUString * >
(getRowAny( nRow ).getValue() )); (getRowAny( nRow ).getValue() ));
} }
catch(const SQLException&) catch(const SQLException&)
...@@ -335,7 +335,7 @@ const Reference< XContentIdentifier >& SAL_CALL CachedContentResultSet::CCRS_Cac ...@@ -335,7 +335,7 @@ const Reference< XContentIdentifier >& SAL_CALL CachedContentResultSet::CCRS_Cac
rRow <<= m_xContentIdentifierMapping->mapContentIdentifier( aValue ); rRow <<= m_xContentIdentifierMapping->mapContentIdentifier( aValue );
remindMapped( nRow ); remindMapped( nRow );
} }
return (* reinterpret_cast< const Reference< XContentIdentifier > * > return (* static_cast< const Reference< XContentIdentifier > * >
(getRowAny( nRow ).getValue() )); (getRowAny( nRow ).getValue() ));
} }
catch(const SQLException&) catch(const SQLException&)
...@@ -358,7 +358,7 @@ const Reference< XContent >& SAL_CALL CachedContentResultSet::CCRS_Cache ...@@ -358,7 +358,7 @@ const Reference< XContent >& SAL_CALL CachedContentResultSet::CCRS_Cache
rRow <<= m_xContentIdentifierMapping->mapContent( aValue ); rRow <<= m_xContentIdentifierMapping->mapContent( aValue );
remindMapped( nRow ); remindMapped( nRow );
} }
return (* reinterpret_cast< const Reference< XContent > * > return (* static_cast< const Reference< XContent > * >
(getRowAny( nRow ).getValue() )); (getRowAny( nRow ).getValue() ));
} }
catch (const SQLException&) catch (const SQLException&)
......
...@@ -37,7 +37,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL cached1_component_getFactory( ...@@ -37,7 +37,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL cached1_component_getFactory(
void * pRet = 0; void * pRet = 0;
Reference< XMultiServiceFactory > xSMgr( Reference< XMultiServiceFactory > xSMgr(
reinterpret_cast< XMultiServiceFactory * >( pServiceManager ) ); static_cast< XMultiServiceFactory * >( pServiceManager ) );
Reference< XSingleServiceFactory > xFactory; Reference< XSingleServiceFactory > xFactory;
......
...@@ -36,7 +36,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL ucb_component_getFactory( ...@@ -36,7 +36,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL ucb_component_getFactory(
void * pRet = 0; void * pRet = 0;
Reference< XMultiServiceFactory > xSMgr( Reference< XMultiServiceFactory > xSMgr(
reinterpret_cast< XMultiServiceFactory * >( pServiceManager ) ); static_cast< XMultiServiceFactory * >( pServiceManager ) );
Reference< XSingleServiceFactory > xFactory; Reference< XSingleServiceFactory > xFactory;
......
...@@ -32,7 +32,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL srtrs1_component_getFactory( ...@@ -32,7 +32,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL srtrs1_component_getFactory(
void * pRet = 0; void * pRet = 0;
Reference< XMultiServiceFactory > xSMgr( Reference< XMultiServiceFactory > xSMgr(
reinterpret_cast< XMultiServiceFactory * >( pServiceManager ) ); static_cast< XMultiServiceFactory * >( pServiceManager ) );
Reference< XSingleServiceFactory > xFactory; Reference< XSingleServiceFactory > xFactory;
......
...@@ -130,7 +130,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL ucpcmis1_component_getFactory( c ...@@ -130,7 +130,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL ucpcmis1_component_getFactory( c
void * pRet = 0; void * pRet = 0;
uno::Reference< lang::XMultiServiceFactory > xSMgr uno::Reference< lang::XMultiServiceFactory > xSMgr
(reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ) ); (static_cast< lang::XMultiServiceFactory * >( pServiceManager ) );
uno::Reference< lang::XSingleServiceFactory > xFactory; uno::Reference< lang::XSingleServiceFactory > xFactory;
if ( ::cmis::ContentProvider::getImplementationName_Static().equalsAscii( pImplName ) ) if ( ::cmis::ContentProvider::getImplementationName_Static().equalsAscii( pImplName ) )
......
...@@ -53,7 +53,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL ucpfile_component_getFactory( ...@@ -53,7 +53,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL ucpfile_component_getFactory(
void * pRet = 0; void * pRet = 0;
Reference< XMultiServiceFactory > xSMgr( Reference< XMultiServiceFactory > xSMgr(
reinterpret_cast< XMultiServiceFactory * >( pServiceManager ) ); static_cast< XMultiServiceFactory * >( pServiceManager ) );
Reference< XSingleServiceFactory > xFactory; Reference< XSingleServiceFactory > xFactory;
......
...@@ -32,7 +32,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL ucpftp1_component_getFactory( ...@@ -32,7 +32,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL ucpftp1_component_getFactory(
void * pRet = 0; void * pRet = 0;
uno::Reference< lang::XMultiServiceFactory > xSMgr( uno::Reference< lang::XMultiServiceFactory > xSMgr(
reinterpret_cast< lang::XMultiServiceFactory * >( static_cast< lang::XMultiServiceFactory * >(
pServiceManager ) ); pServiceManager ) );
uno::Reference< lang::XSingleServiceFactory > xFactory; uno::Reference< lang::XSingleServiceFactory > xFactory;
......
...@@ -102,7 +102,7 @@ extern "C" { ...@@ -102,7 +102,7 @@ extern "C" {
int memory_write(void *buffer,size_t size,size_t nmemb,void *stream) int memory_write(void *buffer,size_t size,size_t nmemb,void *stream)
{ {
MemoryContainer *_stream = MemoryContainer *_stream =
reinterpret_cast<MemoryContainer*>(stream); static_cast<MemoryContainer*>(stream);
if(!_stream) if(!_stream)
return 0; return 0;
......
...@@ -117,7 +117,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL ucpgio1_component_getFactory( co ...@@ -117,7 +117,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL ucpgio1_component_getFactory( co
void * pRet = 0; void * pRet = 0;
uno::Reference< lang::XMultiServiceFactory > xSMgr uno::Reference< lang::XMultiServiceFactory > xSMgr
(reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ) ); (static_cast< lang::XMultiServiceFactory * >( pServiceManager ) );
uno::Reference< lang::XSingleServiceFactory > xFactory; uno::Reference< lang::XSingleServiceFactory > xFactory;
#if !GLIB_CHECK_VERSION(2,36,0) #if !GLIB_CHECK_VERSION(2,36,0)
g_type_init(); g_type_init();
......
...@@ -32,7 +32,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL ucphier1_component_getFactory( ...@@ -32,7 +32,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL ucphier1_component_getFactory(
void * pRet = 0; void * pRet = 0;
uno::Reference< lang::XMultiServiceFactory > xSMgr( uno::Reference< lang::XMultiServiceFactory > xSMgr(
reinterpret_cast< lang::XMultiServiceFactory * >( static_cast< lang::XMultiServiceFactory * >(
pServiceManager ) ); pServiceManager ) );
uno::Reference< lang::XSingleServiceFactory > xFactory; uno::Reference< lang::XSingleServiceFactory > xFactory;
......
...@@ -31,7 +31,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL ucppkg1_component_getFactory( ...@@ -31,7 +31,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL ucppkg1_component_getFactory(
void * pRet = 0; void * pRet = 0;
uno::Reference< lang::XMultiServiceFactory > xSMgr( uno::Reference< lang::XMultiServiceFactory > xSMgr(
reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ) ); static_cast< lang::XMultiServiceFactory * >( pServiceManager ) );
uno::Reference< lang::XSingleServiceFactory > xFactory; uno::Reference< lang::XSingleServiceFactory > xFactory;
......
...@@ -35,7 +35,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL ucptdoc1_component_getFactory( ...@@ -35,7 +35,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL ucptdoc1_component_getFactory(
void * pRet = 0; void * pRet = 0;
uno::Reference< lang::XMultiServiceFactory > xSMgr( uno::Reference< lang::XMultiServiceFactory > xSMgr(
reinterpret_cast< lang::XMultiServiceFactory * >( static_cast< lang::XMultiServiceFactory * >(
pServiceManager ) ); pServiceManager ) );
uno::Reference< lang::XSingleServiceFactory > xFactory; uno::Reference< lang::XSingleServiceFactory > xFactory;
......
...@@ -40,7 +40,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL ucpdav1_component_getFactory( ...@@ -40,7 +40,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL ucpdav1_component_getFactory(
void * pRet = 0; void * pRet = 0;
uno::Reference< lang::XMultiServiceFactory > xSMgr( uno::Reference< lang::XMultiServiceFactory > xSMgr(
reinterpret_cast< lang::XMultiServiceFactory * >( static_cast< lang::XMultiServiceFactory * >(
pServiceManager ) ); pServiceManager ) );
uno::Reference< lang::XSingleServiceFactory > xFactory; uno::Reference< lang::XSingleServiceFactory > xFactory;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment