summaryrefslogtreecommitdiff
path: root/sc/inc
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-11-14 11:58:53 +0100
committerStephan Bergmann <sbergman@redhat.com>2022-11-14 13:33:25 +0100
commitd1faa8f62621221e85b8f7d42b766a6a4e76923f (patch)
tree8892ecd189a0d8d13c84efb9f8c15edfcc121640 /sc/inc
parentd8c89fb920af747ec51ce966b5d7b65e9340afbd (diff)
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 <sbergman@redhat.com>
Diffstat (limited to 'sc/inc')
-rw-r--r--sc/inc/tabopparams.hxx2
1 files changed, 1 insertions, 1 deletions
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 &&