[Libreoffice-commits] core.git: scaddins/source sccomp/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Thu Mar 12 16:45:10 UTC 2020
scaddins/source/analysis/analysishelper.hxx | 28 ++++++++++-----------
scaddins/source/datefunc/datefunc.hxx | 18 ++++++-------
scaddins/source/pricing/pricing.hxx | 18 ++++++-------
sccomp/source/solver/DifferentialEvolution.hxx | 4 +--
sccomp/source/solver/ParticelSwarmOptimization.hxx | 2 -
sccomp/source/solver/SwarmSolver.cxx | 4 ++-
6 files changed, 38 insertions(+), 36 deletions(-)
New commits:
commit 8070e2f7c6db94e819c9bf9597b347cfbcf06be4
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Mar 12 09:39:16 2020 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Mar 12 17:44:30 2020 +0100
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 at collabora.co.uk>
diff --git a/scaddins/source/analysis/analysishelper.hxx b/scaddins/source/analysis/analysishelper.hxx
index 73064ebf7cc7..f6fc943a1fe9 100644
--- a/scaddins/source/analysis/analysishelper.hxx
+++ b/scaddins/source/analysis/analysishelper.hxx
@@ -191,11 +191,11 @@ struct FuncDataBase
const char* pIntName;
const char* pUINameID; // resource ID to UI name
const char** pDescrID; // resource ID to description, parameter names and ~ description
- bool const bDouble; // name already exist in Calc
- bool const bWithOpt; // first parameter is internal
+ bool bDouble; // name already exist in Calc
+ bool bWithOpt; // first parameter is internal
const char** pCompListID; // list of valid names
- sal_uInt16 const nNumOfParams; // number of named / described parameters
- FDCategory const eCat; // function category
+ sal_uInt16 nNumOfParams; // number of named / described parameters
+ FDCategory eCat; // function category
const char* pSuffix; // if bDouble, append a suffix other than "_ADD" for UI
};
@@ -203,15 +203,15 @@ struct FuncDataBase
class FuncData final
{
private:
- OUString const aIntName;
+ OUString aIntName;
const char* pUINameID;
const char** pDescrID; // leads also to parameter descriptions!
- bool const bDouble; // flag for names that already exist in Calc
- bool const bWithOpt; // has internal parameter on first position
+ bool bDouble; // flag for names that already exist in Calc
+ bool bWithOpt; // has internal parameter on first position
- sal_uInt16 const nParam; // num of parameters
+ sal_uInt16 nParam; // num of parameters
std::vector<OUString> aCompList; // list of all valid names
- FDCategory const eCat; // function category
+ FDCategory eCat; // function category
OUString aSuffix; // if bDouble and not empty, append a suffix other than "_ADD" for UI
public:
@@ -503,10 +503,10 @@ class ConvertData
{
protected:
friend class ConvertDataList;
- double const fConst;
- OUString const aName;
- ConvertDataClass const eClass;
- bool const bPrefixSupport;
+ double fConst;
+ OUString aName;
+ ConvertDataClass eClass;
+ bool bPrefixSupport;
public:
ConvertData(
const char pUnitName[],
@@ -533,7 +533,7 @@ public:
class ConvertDataLinear final : public ConvertData
{
- double const fOffs;
+ double fOffs;
public:
inline ConvertDataLinear(
const char pUnitName[],
diff --git a/scaddins/source/datefunc/datefunc.hxx b/scaddins/source/datefunc/datefunc.hxx
index ab49a1bf30c7..528a6d2f0b51 100644
--- a/scaddins/source/datefunc/datefunc.hxx
+++ b/scaddins/source/datefunc/datefunc.hxx
@@ -50,23 +50,23 @@ struct ScaFuncDataBase
const char* pUINameID; // resource ID to UI name
const char** pDescrID; // resource ID to description, parameter names and ~ description
const char** pCompListID; // list of valid names
- sal_uInt16 const nParamCount; // number of named / described parameters
- ScaCategory const eCat; // function category
- bool const bDouble; // name already exist in Calc
- bool const bWithOpt; // first parameter is internal
+ sal_uInt16 nParamCount; // number of named / described parameters
+ ScaCategory eCat; // function category
+ bool bDouble; // name already exist in Calc
+ bool bWithOpt; // first parameter is internal
};
class ScaFuncData final
{
private:
- OUString const aIntName; // internal name (get***)
+ OUString aIntName; // internal name (get***)
const char* pUINameID; // resource ID to UI name
const char** pDescrID; // leads also to parameter descriptions!
- sal_uInt16 const nParamCount; // num of parameters
+ sal_uInt16 nParamCount; // num of parameters
std::vector<OUString> aCompList; // list of all valid names
- ScaCategory const eCat; // function category
- bool const bDouble; // name already exist in Calc
- bool const bWithOpt; // first parameter is internal
+ ScaCategory eCat; // function category
+ bool bDouble; // name already exist in Calc
+ bool bWithOpt; // first parameter is internal
public:
ScaFuncData(const ScaFuncDataBase& rBaseData);
diff --git a/scaddins/source/pricing/pricing.hxx b/scaddins/source/pricing/pricing.hxx
index 54c1e5483d7f..8acbfd4a8307 100644
--- a/scaddins/source/pricing/pricing.hxx
+++ b/scaddins/source/pricing/pricing.hxx
@@ -66,23 +66,23 @@ struct ScaFuncDataBase
// (English) function names again.
// see also: GetExcelName() or GetCompNames() or getCompatibilityNames()
const char* pCompName;
- sal_uInt16 const nParamCount; // number of named / described parameters
- ScaCategory const eCat; // function category
- bool const bDouble; // name already exist in Calc
- bool const bWithOpt; // first parameter is internal
+ sal_uInt16 nParamCount; // number of named / described parameters
+ ScaCategory eCat; // function category
+ bool bDouble; // name already exist in Calc
+ bool bWithOpt; // first parameter is internal
};
class ScaFuncData final
{
private:
- OUString const aIntName; // internal name (get***)
+ OUString aIntName; // internal name (get***)
const char* pUINameID; // resource ID to UI name
const char** pDescrID; // leads also to parameter descriptions!
- sal_uInt16 const nParamCount; // num of parameters
+ sal_uInt16 nParamCount; // num of parameters
std::vector<OUString> aCompList; // list of all valid names
- ScaCategory const eCat; // function category
- bool const bDouble; // name already exist in Calc
- bool const bWithOpt; // first parameter is internal
+ ScaCategory eCat; // function category
+ bool bDouble; // name already exist in Calc
+ bool bWithOpt; // first parameter is internal
public:
ScaFuncData(const ScaFuncDataBase& rBaseData);
diff --git a/sccomp/source/solver/DifferentialEvolution.hxx b/sccomp/source/solver/DifferentialEvolution.hxx
index a71af6d82fe7..7d18821350aa 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 const mnPopulationSize;
+ size_t mnPopulationSize;
std::vector<Individual> maPopulation;
std::random_device maRandomDevice;
std::mt19937 maGenerator;
- size_t const mnDimensionality;
+ size_t 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 61eed529785d..ec76474ddece 100644
--- a/sccomp/source/solver/ParticelSwarmOptimization.hxx
+++ b/sccomp/source/solver/ParticelSwarmOptimization.hxx
@@ -49,7 +49,7 @@ private:
DataProvider& mrDataProvider;
- size_t const mnNumOfParticles;
+ size_t mnNumOfParticles;
std::vector<Particle> maSwarm;
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; }
More information about the Libreoffice-commits
mailing list