summaryrefslogtreecommitdiff
path: root/sccomp
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-10-08 16:19:20 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-10-09 08:11:05 +0200
commit1ab27f9ae6f32c7502884c02c2217bbdcf035c48 (patch)
tree3d8d074f96d32cd2f8d486c7bd991a07067adb04 /sccomp
parent453879cfd8f4a8e22847043231a0929e4d50f238 (diff)
loplugin:constfields in scaddins,sccomp
Change-Id: I4d21cfcc65c099fbddbe5146fc1b8a6257971e32 Reviewed-on: https://gerrit.libreoffice.org/61555 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sccomp')
-rw-r--r--sccomp/source/solver/DifferentialEvolution.hxx4
-rw-r--r--sccomp/source/solver/ParticelSwarmOptimization.hxx2
-rw-r--r--sccomp/source/solver/SwarmSolver.cxx4
3 files changed, 4 insertions, 6 deletions
diff --git a/sccomp/source/solver/DifferentialEvolution.hxx b/sccomp/source/solver/DifferentialEvolution.hxx
index 7d18821350aa..a71af6d82fe7 100644
--- a/sccomp/source/solver/DifferentialEvolution.hxx
+++ b/sccomp/source/solver/DifferentialEvolution.hxx
@@ -29,12 +29,12 @@ template <typename DataProvider> class DifferentialEvolutionAlgorithm
DataProvider& mrDataProvider;
- size_t mnPopulationSize;
+ size_t const mnPopulationSize;
std::vector<Individual> maPopulation;
std::random_device maRandomDevice;
std::mt19937 maGenerator;
- size_t mnDimensionality;
+ size_t const mnDimensionality;
std::uniform_int_distribution<> maRandomPopulation;
std::uniform_int_distribution<> maRandomDimensionality;
diff --git a/sccomp/source/solver/ParticelSwarmOptimization.hxx b/sccomp/source/solver/ParticelSwarmOptimization.hxx
index ec76474ddece..61eed529785d 100644
--- a/sccomp/source/solver/ParticelSwarmOptimization.hxx
+++ b/sccomp/source/solver/ParticelSwarmOptimization.hxx
@@ -49,7 +49,7 @@ private:
DataProvider& mrDataProvider;
- size_t mnNumOfParticles;
+ size_t const mnNumOfParticles;
std::vector<Particle> maSwarm;
diff --git a/sccomp/source/solver/SwarmSolver.cxx b/sccomp/source/solver/SwarmSolver.cxx
index 2a549fb0e0a8..11d1cb2e8f18 100644
--- a/sccomp/source/solver/SwarmSolver.cxx
+++ b/sccomp/source/solver/SwarmSolver.cxx
@@ -116,7 +116,6 @@ private:
// results
bool mbSuccess;
- double mfResultValue;
uno::Sequence<double> maSolution;
OUString maStatus;
@@ -140,7 +139,6 @@ public:
, mnTimeout(60000)
, mnAlgorithm(0)
, mbSuccess(false)
- , mfResultValue(0.0)
{
registerProperty("NonNegative", PROP_NONNEGATIVE, 0, &mbNonNegative,
cppu::UnoType<decltype(mbNonNegative)>::get());
@@ -212,7 +210,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 mfResultValue; }
+ virtual double SAL_CALL getResultValue() override { return 0; }
virtual uno::Sequence<double> SAL_CALL getSolution() override { return maSolution; }