[Libreoffice-commits] core.git: sw/source
Michael Stahl
mstahl at redhat.com
Fri Feb 2 20:06:31 UTC 2018
sw/source/core/bastyp/swcache.cxx | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
New commits:
commit 7f34c1a7190bb0b8785211b17dc68d3ff264d044
Author: Michael Stahl <mstahl at 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 <ci at libreoffice.org>
Reviewed-by: Michael Stahl <mstahl at 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 )
More information about the Libreoffice-commits
mailing list