diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-01-28 13:50:17 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-01-28 13:50:37 +0100 |
commit | 4e3da621fe26c2ad85258692c63a044d0541bd64 (patch) | |
tree | 05607d0de471c5d9451b197945243f735ee168b0 /sal | |
parent | 4b60941b60262be4861f5e8fba95366d3187c445 (diff) |
Some more loplugin:cstylecast clean-up
Change-Id: I132d22e2af3cf673c17d8964f690d48990834884
Diffstat (limited to 'sal')
-rw-r--r-- | sal/qa/osl/module/osl_Module.cxx | 21 | ||||
-rw-r--r-- | sal/qa/osl/process/osl_process.cxx | 3 |
2 files changed, 18 insertions, 6 deletions
diff --git a/sal/qa/osl/module/osl_Module.cxx b/sal/qa/osl/module/osl_Module.cxx index 1612662cbeee..60a336348543 100644 --- a/sal/qa/osl/module/osl_Module.cxx +++ b/sal/qa/osl/module/osl_Module.cxx @@ -38,7 +38,8 @@ inline ::rtl::OUString getDllURL( void ) #endif ::rtl::OUString dirPath, dllPath; - osl::Module::getUrlFromAddress( ( void* ) &getDllURL, dirPath ); + osl::Module::getUrlFromAddress( + reinterpret_cast<oslGenericFunction>(&getDllURL), dirPath); dirPath = dirPath.copy( 0, dirPath.lastIndexOf('/') + 1); osl::FileBase::getAbsoluteFileURL( dirPath, libPath, dllPath ); @@ -81,7 +82,10 @@ namespace osl_Module void ctors_name_mode( ) { OUString aFileURL; - bRes = osl::Module::getUrlFromAddress( ( void* ) &::osl_Module::testClass::myFunc, aFileURL ); + bRes = osl::Module::getUrlFromAddress( + reinterpret_cast<oslGenericFunction>( + &osl_Module::testClass::myFunc), + aFileURL); if ( !( bRes ) ) { @@ -113,7 +117,10 @@ namespace osl_Module void getUrlFromAddress_001( ) { OUString aFileURL; - bRes = osl::Module::getUrlFromAddress( ( void* ) &::osl_Module::testClass::myFunc, aFileURL ) ; + bRes = osl::Module::getUrlFromAddress( + reinterpret_cast<oslGenericFunction>( + &osl_Module::testClass::myFunc), + aFileURL); if ( !( bRes ) ) { CPPUNIT_ASSERT_MESSAGE("Cannot locate current module.", false ); @@ -131,7 +138,8 @@ namespace osl_Module FuncPtr pFunc = ( FuncPtr ) aMod.getSymbol( rtl::OUString("firstfunc") ); OUString aFileURL; - bRes = osl::Module::getUrlFromAddress( ( void* )pFunc, aFileURL ); + bRes = osl::Module::getUrlFromAddress( + reinterpret_cast<oslGenericFunction>(pFunc), aFileURL); if ( !( bRes ) ) { CPPUNIT_ASSERT_MESSAGE("Cannot locate current module.", false ); @@ -214,7 +222,10 @@ namespace osl_Module void is_001( ) { OUString aFileURL; - bRes = osl::Module::getUrlFromAddress( ( void* ) &::osl_Module::testClass::myFunc, aFileURL ); + bRes = osl::Module::getUrlFromAddress( + reinterpret_cast<oslGenericFunction>( + osl_Module::testClass::myFunc), + aFileURL); if ( !( bRes ) ) { CPPUNIT_ASSERT_MESSAGE("Cannot locate current module - using executable instead", false ); diff --git a/sal/qa/osl/process/osl_process.cxx b/sal/qa/osl/process/osl_process.cxx index 5a5e8a8c9e4c..a1e5a20fdbbe 100644 --- a/sal/qa/osl/process/osl_process.cxx +++ b/sal/qa/osl/process/osl_process.cxx @@ -83,7 +83,8 @@ using ::rtl::OString; inline ::rtl::OUString getExecutablePath( void ) { ::rtl::OUString dirPath; - osl::Module::getUrlFromAddress( ( void* ) &getExecutablePath, dirPath ); + osl::Module::getUrlFromAddress( + reinterpret_cast<oslGenericFunction>(&getExecutablePath), dirPath); dirPath = dirPath.copy( 0, dirPath.lastIndexOf('/') ); dirPath = dirPath.copy( 0, dirPath.lastIndexOf('/') + 1); dirPath += rtl::OUString("Executable"); |