diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-02-02 17:14:33 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-02-02 18:23:31 +0000 |
commit | b6ac3a95570a1e648e030994c33a5a6c570e266c (patch) | |
tree | 0d5aba4c139277eb57c72b8719b105594082709f /sw | |
parent | fd35fad16a656d333bdbf1cc9214d1185d33ceb3 (diff) |
coverity#705106 rearrange the assert and condition
Change-Id: I40c0f00af941d0aa25e99bdd772b1ac4258cddd6
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/table/swnewtable.cxx | 8 |
1 files changed, 3 insertions, 5 deletions
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 ]; |