summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-07-09 08:50:37 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-07-13 18:14:11 +0200
commitcbce40e965acef51822b31d73da5fbc271fbcad0 (patch)
treebad77c67c68055f7597b8ecf1df1b74e778873cf /basic
parent429280541ff1fbbbf3f0482211a659c96c3347d2 (diff)
Make content of OSL_ASSERT, DBG_ASSERT, etc. visiblie in non-debug builds
...to avoid lots of loplugin:staticmethods warnings. Also enables DBG_ASSERT etc. also for --enable-debug builds in addition to --enable-dbgutil builds. Change-Id: Ib89ecd9ab8ce7abb2c64790ace248b31f9d2b64d
Diffstat (limited to 'basic')
-rw-r--r--basic/source/basmgr/basicmanagerrepository.cxx10
-rw-r--r--basic/source/basmgr/basmgr.cxx14
2 files changed, 5 insertions, 19 deletions
diff --git a/basic/source/basmgr/basicmanagerrepository.cxx b/basic/source/basmgr/basicmanagerrepository.cxx
index d4996f971c89..c7c0500a7e40 100644
--- a/basic/source/basmgr/basicmanagerrepository.cxx
+++ b/basic/source/basmgr/basicmanagerrepository.cxx
@@ -540,9 +540,6 @@ namespace basic
SolarMutexGuard g;
Reference< XInterface > xNormalizedSource( _rSource.Source, UNO_QUERY );
- #if OSL_DEBUG_LEVEL > 0
- bool bFound = false;
- #endif
for ( BasicManagerStore::iterator loop = m_aStore.begin();
loop != m_aStore.end();
@@ -552,14 +549,11 @@ namespace basic
if ( loop->first.get() == xNormalizedSource.get() )
{
impl_removeFromRepository( loop );
- #if OSL_DEBUG_LEVEL > 0
- bFound = true;
- #endif
- break;
+ return;
}
}
- OSL_ENSURE( bFound, "ImplRepository::_disposing: where does this come from?" );
+ OSL_FAIL( "ImplRepository::_disposing: where does this come from?" );
}
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index da8681aa76e0..b4f57d19f80f 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -184,10 +184,8 @@ void BasMgrContainerListenerImpl::insertLibraryImpl( const uno::Reference< scrip
if( !pMgr->GetLib( aLibName ) )
{
BasicManager* pBasMgr = static_cast< BasicManager* >( pMgr );
-#ifdef DBG_UTIL
StarBASIC* pLib =
-#endif
- pBasMgr->CreateLibForLibContainer( aLibName, xScriptCont );
+ pBasMgr->CreateLibForLibContainer( aLibName, xScriptCont );
DBG_ASSERT( pLib, "XML Import: Basic library could not be created");
}
@@ -308,10 +306,7 @@ void SAL_CALL BasMgrContainerListenerImpl::elementReplaced( const container::Con
Event.Accessor >>= aName;
// Replace not possible for library container
-#ifdef DBG_UTIL
- bool bLibContainer = maLibName.isEmpty();
-#endif
- DBG_ASSERT( !bLibContainer, "library container fired elementReplaced()");
+ DBG_ASSERT( !maLibName.isEmpty(), "library container fired elementReplaced()");
StarBASIC* pLib = mpMgr->GetLib( maLibName );
if( pLib )
@@ -2287,10 +2282,7 @@ void SAL_CALL StarBasicAccess_Impl::createLibrary
throw(container::ElementExistException, uno::RuntimeException, std::exception)
{
(void)ExternalSourceURL;
-#ifdef DBG_UTIL
- StarBASIC* pLib =
-#endif
- mpMgr->CreateLib( LibName, Password, LinkTargetURL );
+ StarBASIC* pLib = mpMgr->CreateLib( LibName, Password, LinkTargetURL );
DBG_ASSERT( pLib, "XML Import: Basic library could not be created");
}