sw/source/core/undo/undobj.cxx |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

New commits:
commit 47c417c553c7ffcb85cba5b5943316ea9e93f025
Author:     Julien Nabet <serval2...@yahoo.fr>
AuthorDate: Mon Oct 7 21:20:49 2019 +0200
Commit:     Julien Nabet <serval2...@yahoo.fr>
CommitDate: Tue Oct 8 06:52:17 2019 +0200

    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.gran...@collabora.co.uk>
    Tested-by: Jenkins
    Reviewed-by: Julien Nabet <serval2...@yahoo.fr>

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
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to