sw/source/core/bastyp/swcache.cxx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
New commits: commit 7f34c1a7190bb0b8785211b17dc68d3ff264d044 Author: Michael Stahl <mst...@redhat.com> Date: Fri Feb 2 15:32:11 2018 +0100 sw: convert OSL_ENSURE to assert() in SwCache Change-Id: I66075a8f77a3b399116ddd0493037c1427dfd7d2 Reviewed-on: https://gerrit.libreoffice.org/49153 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Michael Stahl <mst...@redhat.com> 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 ) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits