sw/source/core/docnode/nodes.cxx |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit 25c2b4c4505060bbf207ed82036a63fee97a3689
Author:     Michael Stahl <michael.st...@allotropia.de>
AuthorDate: Wed Feb 28 15:18:31 2024 +0100
Commit:     Michael Stahl <michael.st...@allotropia.de>
CommitDate: Fri Mar 1 10:29:25 2024 +0100

    sw: deliver promised punishment via assert()
    
    Change-Id: I57c3ead622c3f64c5b2f007309987e60249b079b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164157
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>

diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx
index 23729d1bedc0..a5c8e6a52bb2 100644
--- a/sw/source/core/docnode/nodes.cxx
+++ b/sw/source/core/docnode/nodes.cxx
@@ -1763,10 +1763,8 @@ void SwNodes::CopyNodes( const SwNodeRange& rRange,
         return;
 
     // when inserting into the source range, nothing need to be done
-    OSL_ENSURE( &aRg.aStart.GetNodes() == this,
-                "aRg should use this node array" );
-    OSL_ENSURE( &aRg.aStart.GetNodes() == &aRg.aEnd.GetNodes(),
-               "Range across different nodes arrays? You deserve punishment!");
+    assert(&aRg.aStart.GetNodes() == this);
+    assert(&aRg.aStart.GetNodes() == &aRg.aEnd.GetNodes());
     if( &rPos.GetNodes() == &aRg.aStart.GetNodes() &&
         rPos.GetIndex() >= aRg.aStart.GetIndex() &&
         rPos.GetIndex() < aRg.aEnd.GetIndex() )

Reply via email to