sw/inc/ndhints.hxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit 12ff9cda71c6a4f83e8db0b3f3f9bcfb337d32ca Author: Caolán McNamara <[email protected]> AuthorDate: Sun Mar 1 21:31:18 2026 +0000 Commit: Caolán McNamara <[email protected]> CommitDate: Mon Mar 2 09:12:16 2026 +0100 decode these assert lines to be more readable Change-Id: I7bd0c4e9efe4b1625e52d0d1f1f6f3fc3e499d70 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200734 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Jenkins diff --git a/sw/inc/ndhints.hxx b/sw/inc/ndhints.hxx index e5d43d5973f7..ada0131a7274 100644 --- a/sw/inc/ndhints.hxx +++ b/sw/inc/ndhints.hxx @@ -163,7 +163,7 @@ public: int GetLastPosSortedByEnd(sal_Int32 nEndPos) const; SwTextAttr * GetSortedByEnd( size_t nPos ) const { - assert( !(nPos != 0 && m_EndMapNeedsSortingRange.first != SAL_MAX_INT32) && "going to trigger a resort in the middle of an iteration, that's bad" ); + assert( (nPos == 0 || m_EndMapNeedsSortingRange.first == SAL_MAX_INT32) && "going to trigger a resort in the middle of an iteration, that's bad" ); if (m_EndMapNeedsSortingRange.first != SAL_MAX_INT32) ResortEndMap(); return m_HintsByEnd[nPos]; @@ -172,7 +172,7 @@ public: size_t GetFirstPosSortedByWhichAndStart(sal_uInt16 nWhich) const; SwTextAttr * GetSortedByWhichAndStart( size_t nPos ) const { - assert( !(nPos != 0 && m_WhichMapNeedsSortingRange.first.first != SAL_MAX_INT32) && "going to trigger a resort in the middle of an iteration, that's bad" ); + assert( (nPos == 0 || m_WhichMapNeedsSortingRange.first.first == SAL_MAX_INT32) && "going to trigger a resort in the middle of an iteration, that's bad" ); if (m_WhichMapNeedsSortingRange.first.first != SAL_MAX_INT32) ResortWhichMap(); return m_HintsByWhichAndStart[nPos];
