From e859bf8c4da78698b820d13af1a2fdee3602f5b4 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 5 May 2021 14:20:11 +0200 Subject: loplugin:constmethod Change-Id: I7913fd8144d521b8293ac43036d0fad82e457cd1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115145 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sc/inc/scmatrix.hxx | 2 +- sc/qa/unit/parallelism.cxx | 4 ++-- sc/source/core/tool/interpr1.cxx | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'sc') diff --git a/sc/inc/scmatrix.hxx b/sc/inc/scmatrix.hxx index 2a1d9342499f..463b15e17b42 100644 --- a/sc/inc/scmatrix.hxx +++ b/sc/inc/scmatrix.hxx @@ -161,7 +161,7 @@ public: KahanIterateResult(double fAccumulator, size_t nCount) : maAccumulator(fAccumulator), mnCount(nCount) {} - double get() { return maAccumulator.get(); } + double get() const { return maAccumulator.get(); } }; diff --git a/sc/qa/unit/parallelism.cxx b/sc/qa/unit/parallelism.cxx index e3902a2827bf..5f25cf3c582e 100644 --- a/sc/qa/unit/parallelism.cxx +++ b/sc/qa/unit/parallelism.cxx @@ -70,7 +70,7 @@ public: private: - bool getThreadingFlag(); + bool getThreadingFlag() const; void setThreadingFlag(bool bSet); static ScUndoCut* cutToClip(ScDocShell& rDocSh, const ScRange& rRange, ScDocument* pClipDoc, bool bCreateUndo); @@ -87,7 +87,7 @@ ScParallelismTest::ScParallelismTest() { } -bool ScParallelismTest::getThreadingFlag() +bool ScParallelismTest::getThreadingFlag() const { return officecfg::Office::Calc::Formula::Calculation::UseThreadedCalculationForFormulaGroups::get(); } diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index debe11a95581..94923f75c255 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -3937,7 +3937,7 @@ void ScInterpreter::GetStVarParams( bool bTextAsZero, double(*VarResult)( double std::vector mvValues; KahanSum mfSum; ArrayRefListValue() = default; - double get() { return mfSum.get(); } + double get() const { return mfSum.get(); } }; std::vector vArrayValues; -- cgit