summaryrefslogtreecommitdiff
path: root/xmlhelp/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-06-08 16:29:59 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-06-08 16:29:59 +0200
commite7b4225fc8dbc8482150163b0e0c26f1fc3a7449 (patch)
tree2ceaec08f8cb37edbaa9e58ddba686845c142c79 /xmlhelp/source
parentced1ffc2d91e0eeac14fedb94f7f31532d3e8f22 (diff)
loplugin:cstylecast: deal with remaining pointer casts
Change-Id: I4e24ee646763e758a404bf0832e31e5cebc9d71d
Diffstat (limited to 'xmlhelp/source')
-rw-r--r--xmlhelp/source/cxxhelp/provider/bufferedinputstream.cxx12
-rw-r--r--xmlhelp/source/cxxhelp/provider/databases.cxx4
-rw-r--r--xmlhelp/source/cxxhelp/provider/urlparameter.cxx6
-rw-r--r--xmlhelp/source/treeview/tvfactory.cxx2
4 files changed, 12 insertions, 12 deletions
diff --git a/xmlhelp/source/cxxhelp/provider/bufferedinputstream.cxx b/xmlhelp/source/cxxhelp/provider/bufferedinputstream.cxx
index 1ed291f9859e..bfcdb2e367a8 100644
--- a/xmlhelp/source/cxxhelp/provider/bufferedinputstream.cxx
+++ b/xmlhelp/source/cxxhelp/provider/bufferedinputstream.cxx
@@ -61,11 +61,11 @@ BufferedInputStream::BufferedInputStream(const Reference<XInputStream>& xInputSt
{
tmp = m_pBuffer;
m_pBuffer = new sal_Int8[m_nBufferSize+num];
- memcpy((void *)(m_pBuffer),
- (void *)(tmp),
+ memcpy(static_cast<void *>(m_pBuffer),
+ static_cast<void *>(tmp),
sal_uInt32(m_nBufferSize));
- memcpy((void *)(m_pBuffer+m_nBufferSize),
- (void *)(aData.getArray()),
+ memcpy(static_cast<void *>(m_pBuffer+m_nBufferSize),
+ static_cast<void *>(aData.getArray()),
sal_uInt32(num));
m_nBufferSize += num;
delete[] tmp;
@@ -134,8 +134,8 @@ sal_Int32 SAL_CALL BufferedInputStream::readBytes( Sequence< sal_Int8 >& aData,s
if( aData.getLength() < nBytesToRead )
aData.realloc(nBytesToRead);
- memcpy((void*)(aData.getArray()),
- (void*)(m_pBuffer+m_nBufferLocation),
+ memcpy(static_cast<void*>(aData.getArray()),
+ static_cast<void*>(m_pBuffer+m_nBufferLocation),
nBytesToRead);
return nBytesToRead;
diff --git a/xmlhelp/source/cxxhelp/provider/databases.cxx b/xmlhelp/source/cxxhelp/provider/databases.cxx
index 19a28f9a9928..e9bcfbf30810 100644
--- a/xmlhelp/source/cxxhelp/provider/databases.cxx
+++ b/xmlhelp/source/cxxhelp/provider/databases.cxx
@@ -436,7 +436,7 @@ StaticModuleInformation* Databases::getStaticInformationForModule( const OUStrin
OUString key = processLang(Language) + "/" + Module;
std::pair< ModInfoTable::iterator,bool > aPair =
- m_aModInfo.insert( ModInfoTable::value_type( key,(StaticModuleInformation*)0 ) );
+ m_aModInfo.insert( ModInfoTable::value_type( key,nullptr ) );
ModInfoTable::iterator it = aPair.first;
@@ -836,7 +836,7 @@ KeywordInfo* Databases::getKeyword( const OUString& Database,
OUString key = processLang(Language) + "/" + Database;
std::pair< KeywordInfoTable::iterator,bool > aPair =
- m_aKeywordInfo.insert( KeywordInfoTable::value_type( key,(KeywordInfo*)0 ) );
+ m_aKeywordInfo.insert( KeywordInfoTable::value_type( key,nullptr ) );
KeywordInfoTable::iterator it = aPair.first;
diff --git a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
index 3db0233a09c7..277405700521 100644
--- a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
+++ b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
@@ -712,7 +712,7 @@ zipOpen(SAL_UNUSED_PARAMETER const char *) {
OUString language,jar,path;
if( !ugblData->m_pInitial->get_eid().isEmpty() )
- return (void*)(new Reference< XHierarchicalNameAccess >);
+ return static_cast<void*>(new Reference< XHierarchicalNameAccess >);
else
{
jar = ugblData->m_pInitial->get_jar();
@@ -1143,8 +1143,8 @@ void InputStreamTransformer::addToBuffer( const char* buffer_,int len_ )
char* tmp = buffer;
buffer = new char[ len+len_ ];
- memcpy( (void*)(buffer),(void*)(tmp),sal_uInt32( len ) );
- memcpy( (void*)(buffer+len),(void*)(buffer_),sal_uInt32( len_ ) );
+ memcpy( static_cast<void*>(buffer),static_cast<void*>(tmp),sal_uInt32( len ) );
+ memcpy( static_cast<void*>(buffer+len),static_cast<void const *>(buffer_),sal_uInt32( len_ ) );
delete[] tmp;
len += len_;
}
diff --git a/xmlhelp/source/treeview/tvfactory.cxx b/xmlhelp/source/treeview/tvfactory.cxx
index e76fcfeb4a25..81881f828ca2 100644
--- a/xmlhelp/source/treeview/tvfactory.cxx
+++ b/xmlhelp/source/treeview/tvfactory.cxx
@@ -171,7 +171,7 @@ Reference< XInterface > SAL_CALL
TVFactory::CreateInstance(
const Reference< XMultiServiceFactory >& xMultiServiceFactory )
{
- XServiceInfo* xP = (XServiceInfo*) new TVFactory( comphelper::getComponentContext(xMultiServiceFactory) );
+ XServiceInfo* xP = static_cast<XServiceInfo*>(new TVFactory( comphelper::getComponentContext(xMultiServiceFactory) ));
return Reference< XInterface >::query( xP );
}