From bbfeab3b13b48c99cfa2f94c8c34bc3efef7faa9 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 11 Jan 2016 14:31:00 +0200 Subject: loplugin:unusedmethods unused return value in include/basic Change-Id: Ib1a006adaa92e257d40a20ff0d8beeb37e7c2fe0 Reviewed-on: https://gerrit.libreoffice.org/21360 Tested-by: Jenkins Reviewed-by: Noel Grandin --- basic/source/basmgr/basmgr.cxx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'basic/source/basmgr/basmgr.cxx') diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx index 8b1ecedad5be..ac453835a9ad 100644 --- a/basic/source/basmgr/basmgr.cxx +++ b/basic/source/basmgr/basmgr.cxx @@ -1185,10 +1185,10 @@ bool BasicManager::IsReference( sal_uInt16 nLib ) return false; } -bool BasicManager::RemoveLib( sal_uInt16 nLib ) +void BasicManager::RemoveLib( sal_uInt16 nLib ) { // Only physical deletion if no reference - return RemoveLib( nLib, !IsReference( nLib ) ); + RemoveLib( nLib, !IsReference( nLib ) ); } bool BasicManager::RemoveLib( sal_uInt16 nLib, bool bDelBasicFromStorage ) @@ -1343,9 +1343,8 @@ OUString BasicManager::GetLibName( sal_uInt16 nLib ) return OUString(); } -bool BasicManager::LoadLib( sal_uInt16 nLib ) +void BasicManager::LoadLib( sal_uInt16 nLib ) { - bool bDone = false; DBG_ASSERT( nLib < mpImpl->aLibs.size() , "Lib?!" ); if ( nLib < mpImpl->aLibs.size() ) { @@ -1355,11 +1354,11 @@ bool BasicManager::LoadLib( sal_uInt16 nLib ) { OUString aLibName = rLibInfo.GetLibName(); xLibContainer->loadLibrary( aLibName ); - bDone = xLibContainer->isLibraryLoaded( aLibName ); + xLibContainer->isLibraryLoaded( aLibName ); } else { - bDone = ImpLoadLibrary( &rLibInfo, nullptr ); + ImpLoadLibrary( &rLibInfo, nullptr ); StarBASIC* pLib = GetLib( nLib ); if ( pLib ) { @@ -1373,7 +1372,6 @@ bool BasicManager::LoadLib( sal_uInt16 nLib ) StringErrorInfo* pErrInf = new StringErrorInfo( ERRCODE_BASMGR_LIBLOAD, OUString(), ERRCODE_BUTTON_OK ); aErrors.push_back(BasicError(*pErrInf, BasicErrorReason::LIBNOTFOUND, OUString::number(nLib))); } - return bDone; } StarBASIC* BasicManager::CreateLib( const OUString& rLibName ) -- cgit