From 1e9716fded2ee81f414b12385393b90867dfc86e Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 2 Feb 2018 15:30:20 +0100 Subject: sw: remove very dubious DBG_UTIL code This looks like some defensive programming to avoid a crash only in DBG_UTIL mode, which is a pretty moronic thing to want to do. Change-Id: I93c791a76cf9114359be3fef6b604c86ec49da51 --- sw/source/core/bastyp/swcache.cxx | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/sw/source/core/bastyp/swcache.cxx b/sw/source/core/bastyp/swcache.cxx index c5576d28adb7..8d8b5997ff9a 100644 --- a/sw/source/core/bastyp/swcache.cxx +++ b/sw/source/core/bastyp/swcache.cxx @@ -152,28 +152,7 @@ void SwCache::Flush() SwCacheObj *pTmp; while ( pObj ) { -#ifdef DBG_UTIL - if ( pObj->IsLocked() ) - { - OSL_FAIL( "Flushing locked objects." ); - if ( !m_pRealFirst ) - { - m_pRealFirst = m_pFirst = m_pLast = pObj; - pTmp = pObj->GetNext(); - pObj->SetNext( nullptr ); pObj->SetPrev( nullptr ); - pObj = pTmp; - } - else - { m_pLast->SetNext( pObj ); - pObj->SetPrev( m_pLast ); - m_pLast = pObj; - pTmp = pObj->GetNext(); - pObj->SetNext( nullptr ); - pObj = pTmp; - } - } - else -#endif + assert(!pObj->IsLocked()); { pTmp = pObj; pObj = pTmp->GetNext(); -- cgit