summaryrefslogtreecommitdiff
path: root/sccomp/source/solver/SwarmSolver.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-03-12 09:39:16 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-03-12 17:44:30 +0100
commit8070e2f7c6db94e819c9bf9597b347cfbcf06be4 (patch)
tree5c60f0c543ea017ddc56489d256aad3531c494a6 /sccomp/source/solver/SwarmSolver.cxx
parentf6cd2dd6c6ac69fc2f9baf1e072c4786774ef351 (diff)
Revert "loplugin:constfields in scaddins,sccomp"
This reverts commit 1ab27f9ae6f32c7502884c02c2217bbdcf035c48. Change-Id: Iaf9b011201ee763aaf4d08ceedd6074bafad1c3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90409 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sccomp/source/solver/SwarmSolver.cxx')
-rw-r--r--sccomp/source/solver/SwarmSolver.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/sccomp/source/solver/SwarmSolver.cxx b/sccomp/source/solver/SwarmSolver.cxx
index dc310c64986e..0aa75b158c96 100644
--- a/sccomp/source/solver/SwarmSolver.cxx
+++ b/sccomp/source/solver/SwarmSolver.cxx
@@ -121,6 +121,7 @@ private:
// results
bool mbSuccess;
+ double mfResultValue;
uno::Sequence<double> maSolution;
OUString maStatus;
@@ -144,6 +145,7 @@ public:
, mnTimeout(60000)
, mnAlgorithm(0)
, mbSuccess(false)
+ , mfResultValue(0.0)
{
registerProperty("NonNegative", PROP_NONNEGATIVE, 0, &mbNonNegative,
cppu::UnoType<decltype(mbNonNegative)>::get());
@@ -215,7 +217,7 @@ public:
virtual void SAL_CALL setMaximize(sal_Bool bMaximize) override { mbMaximize = bMaximize; }
virtual sal_Bool SAL_CALL getSuccess() override { return mbSuccess; }
- virtual double SAL_CALL getResultValue() override { return 0; }
+ virtual double SAL_CALL getResultValue() override { return mfResultValue; }
virtual uno::Sequence<double> SAL_CALL getSolution() override { return maSolution; }