diff options
author | Michael Stahl <mstahl@redhat.com> | 2018-02-02 15:32:11 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2018-02-02 21:06:06 +0100 |
commit | 7f34c1a7190bb0b8785211b17dc68d3ff264d044 (patch) | |
tree | 2c6cacba6960470ed82e7101e2faf9e17373d840 | |
parent | 196f8f85fc20491a9d3fa0d4431ed5ec21b318a8 (diff) |
sw: convert OSL_ENSURE to assert() in SwCache
Change-Id: I66075a8f77a3b399116ddd0493037c1427dfd7d2
Reviewed-on: https://gerrit.libreoffice.org/49153
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r-- | sw/source/core/bastyp/swcache.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sw/source/core/bastyp/swcache.cxx b/sw/source/core/bastyp/swcache.cxx index e7ba4d8c702e..c5576d28adb7 100644 --- a/sw/source/core/bastyp/swcache.cxx +++ b/sw/source/core/bastyp/swcache.cxx @@ -199,16 +199,18 @@ void SwCache::ToTop( SwCacheObj *pObj ) if ( !m_pRealFirst ) { // the first will be inserted - OSL_ENSURE( !m_pFirst && !m_pLast, "First not first." ); + assert(!m_pFirst && !m_pLast); m_pRealFirst = m_pFirst = m_pLast = pObj; CHECK; return; } + assert(m_pFirst && m_pLast); + // cut if ( pObj == m_pLast ) { - OSL_ENSURE( pObj->GetPrev(), "Last but no Prev." ); + assert(pObj->GetPrev()); m_pLast = pObj->GetPrev(); m_pLast->SetNext( nullptr ); } @@ -231,8 +233,6 @@ void SwCache::ToTop( SwCacheObj *pObj ) } else { - OSL_ENSURE( m_pFirst, "ToTop, First is not RealFirst an Empty." ); - if ( m_pFirst->GetPrev() ) { m_pFirst->GetPrev()->SetNext( pObj ); @@ -433,7 +433,8 @@ bool SwCache::Insert( SwCacheObj *pNew ) pNew->SetNext( m_pFirst ); } else - { OSL_ENSURE( !m_pLast, "Last but no First." ); + { + assert(!m_pLast); m_pLast = pNew; } if ( m_pFirst == m_pRealFirst ) |