sc/inc/tabopparams.hxx                      |    2 +-
 writerfilter/source/dmapper/PropertyMap.cxx |    2 +-
 writerfilter/source/dmapper/PropertyMap.hxx |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit d1faa8f62621221e85b8f7d42b766a6a4e76923f
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Mon Nov 14 11:58:53 2022 +0100
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Mon Nov 14 13:33:25 2022 +0100

    Add some missing member operator== const qualifiers
    
    ...that were only detected now by GCC 13 trunk after
    
<https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=431be04b8b6e31d950ddab340ed866d197d23d4d>
    "c++: implement P2468R2, the equality operator you are looking for",
    
    > sc/source/core/tool/interpr4.cxx: In member function ‘void 
ScInterpreter::ScTableOp()’:
    > sc/source/core/tool/interpr4.cxx:3608:58: error: C++20 says that these 
are ambiguous, even though the second is reversed: [-Werror]
    >  3608 |     bool bReuseLastParams = (mrDoc.aLastTableOpParams == 
aTableOp);
    >       |                                                          ^~~~~~~~
    > In file included from sc/inc/document.hxx:32,
    >                  from sc/inc/externalrefmgr.hxx:23,
    >                  from sc/source/core/inc/interpre.hxx:28,
    >                  from sc/source/core/tool/interpr4.cxx:22:
    > sc/inc/tabopparams.hxx:76:10: note: candidate 1: ‘bool 
ScInterpreterTableOpParams::operator==(const ScInterpreterTableOpParams&)’
    >    76 |     bool operator ==( const ScInterpreterTableOpParams& r )
    >       |          ^~~~~~~~
    > sc/inc/tabopparams.hxx:76:10: note: candidate 2: ‘bool 
ScInterpreterTableOpParams::operator==(const ScInterpreterTableOpParams&)’ 
(reversed)
    > sc/inc/tabopparams.hxx:76:10: note: try making the operator a ‘const’ 
member function
    
    etc.
    
    Change-Id: I0c55daabbce61aefd762862f3b0e2e5d235c34b3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142698
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/sc/inc/tabopparams.hxx b/sc/inc/tabopparams.hxx
index b796ff8aded4..0ecd7271512c 100644
--- a/sc/inc/tabopparams.hxx
+++ b/sc/inc/tabopparams.hxx
@@ -73,7 +73,7 @@ struct ScInterpreterTableOpParams
         return *this;
     }
 
-    bool operator ==( const ScInterpreterTableOpParams& r )
+    bool operator ==( const ScInterpreterTableOpParams& r ) const
     {
         return
             bValid && r.bValid &&
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx 
b/writerfilter/source/dmapper/PropertyMap.cxx
index eec9b678a209..b0e3b2146795 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -2119,7 +2119,7 @@ ParagraphProperties::ParagraphProperties()
 {
 }
 
-bool ParagraphProperties::operator==( const ParagraphProperties& rCompare )
+bool ParagraphProperties::operator==( const ParagraphProperties& rCompare ) 
const
 {
     return ( m_bFrameMode  == rCompare.m_bFrameMode &&
              m_nDropCap    == rCompare.m_nDropCap &&
diff --git a/writerfilter/source/dmapper/PropertyMap.hxx 
b/writerfilter/source/dmapper/PropertyMap.hxx
index 701546e2fb93..7ec406053f07 100644
--- a/writerfilter/source/dmapper/PropertyMap.hxx
+++ b/writerfilter/source/dmapper/PropertyMap.hxx
@@ -449,7 +449,7 @@ public:
     ParagraphProperties & operator =(ParagraphProperties &&) = default;
 
     // Does not compare the starting/ending range, m_sParaStyleName and 
m_nDropCapLength
-    bool operator==( const ParagraphProperties& );
+    bool operator==( const ParagraphProperties& ) const;
 
     sal_Int32 GetListId() const          { return m_nListId; }
     void      SetListId( sal_Int32 nId ) { m_nListId = nId; }

Reply via email to