From b6ac3a95570a1e648e030994c33a5a6c570e266c Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 2 Feb 2015 17:14:33 +0000 Subject: coverity#705106 rearrange the assert and condition Change-Id: I40c0f00af941d0aa25e99bdd772b1ac4258cddd6 --- sw/source/core/table/swnewtable.cxx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'sw') diff --git a/sw/source/core/table/swnewtable.cxx b/sw/source/core/table/swnewtable.cxx index 80516391edd3..a184f98eecb1 100644 --- a/sw/source/core/table/swnewtable.cxx +++ b/sw/source/core/table/swnewtable.cxx @@ -1323,13 +1323,11 @@ static sal_uInt16 lcl_CalculateSplitLineHeights( SwSplitLines &rCurr, SwSplitLin } } - if( aBoxes.empty() ) - return 0; - - //coverity#705106, help coverity out here - assert(nFirst != USHRT_MAX); if (nFirst == USHRT_MAX) + { + assert(aBoxes.empty()); return 0; + } SwTwips nHeight = 0; SwTwips* pLines = new SwTwips[ nLast + 1 - nFirst ]; -- cgit