diff options
author | Michael Stahl <mstahl@redhat.com> | 2018-02-02 15:30:20 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2018-02-02 21:05:09 +0100 |
commit | 1e9716fded2ee81f414b12385393b90867dfc86e (patch) | |
tree | c53f95abd62f67bb905c4923dfba322affdac3d0 | |
parent | 7f34c1a7190bb0b8785211b17dc68d3ff264d044 (diff) |
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
-rw-r--r-- | sw/source/core/bastyp/swcache.cxx | 23 |
1 files changed, 1 insertions, 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(); |