diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2019-10-07 21:20:49 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2019-10-08 06:52:17 +0200 |
commit | 47c417c553c7ffcb85cba5b5943316ea9e93f025 (patch) | |
tree | bccf524832fd3efce98589c0dbba589f2fac33e0 /sw | |
parent | 810cddee6d2ef0f4057337d699a1a55323faa1ba (diff) |
Simplify if/else and remove useless assert in undoobj.cxx (sw)
791 else if( pEndNdIdx || !pTextNd )
corresponds to the negation of the if condition:
767 if (!pEndNdIdx && pTextNd)
So remove existing "else" block and replace "else if" by "else"
Change-Id: I9681f97fdbaece7495d4765617a2634b0cc8f2e3
Reviewed-on: https://gerrit.libreoffice.org/80399
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/undo/undobj.cxx | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx index 441e1744791a..5a3dd9a3e66c 100644 --- a/sw/source/core/undo/undobj.cxx +++ b/sw/source/core/undo/undobj.cxx @@ -788,7 +788,7 @@ void SwUndoSaveContent::MoveFromUndoNds( SwDoc& rDoc, sal_uLong nNodeIdx, aRedlRest.Restore(); } - else if( pEndNdIdx || !pTextNd ) + else { SwNodeRange aRg( rNds, nNodeIdx, rNds, (pEndNdIdx ? ((*pEndNdIdx) + 1) @@ -796,9 +796,6 @@ void SwUndoSaveContent::MoveFromUndoNds( SwDoc& rDoc, sal_uLong nNodeIdx, rNds.MoveNodes(aRg, rDoc.GetNodes(), rInsPos.nNode, nullptr == pEndNdIdx || bForceCreateFrames); } - else { - assert(false); // wtf? - } } // These two methods move the Point of Pam backwards/forwards. With that, one |