sw/inc/node.hxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit a38834fa013e7a51fc81f7e6ad73a1371c7cad10
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Mon Aug 22 18:49:22 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Tue Aug 23 08:18:06 2022 +0200

    asserts unnecessary for SwNode::operator==
    
    since we're directly comparing pointers. Various places are
    already comparing SwNodeIndex from different documents like this,
    so this doesn't make the code any looser than before.
    
    Change-Id: Ic8feacee67b9495649ffc9560ce105078850a677
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138701
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx
index 62f6da8ef308..4ff2366ee97c 100644
--- a/sw/inc/node.hxx
+++ b/sw/inc/node.hxx
@@ -308,8 +308,8 @@ public:
      */
     virtual void dumpAsXml(xmlTextWriterPtr pWriter) const;
 
-    bool operator==(const SwNode& rOther) const { assert(&GetNodes() == 
&rOther.GetNodes()); return this == &rOther; }
-    bool operator!=(const SwNode& rOther) const { assert(&GetNodes() == 
&rOther.GetNodes()); return this != &rOther; }
+    bool operator==(const SwNode& rOther) const { return this == &rOther; }
+    bool operator!=(const SwNode& rOther) const { return this != &rOther; }
     bool operator<(const SwNode& rOther) const { assert(&GetNodes() == 
&rOther.GetNodes()); return GetIndex() < rOther.GetIndex(); }
     bool operator<=(const SwNode& rOther) const { assert(&GetNodes() == 
&rOther.GetNodes()); return GetIndex() <= rOther.GetIndex(); }
     bool operator>(const SwNode& rOther) const { assert(&GetNodes() == 
&rOther.GetNodes()); return GetIndex() > rOther.GetIndex(); }

Reply via email to