Commit a4698d47b6c067c91f3963bde7fae80e0d13d535

Authored by Benjamin Renard
1 parent 0ea63b02

Fix StatisticProcesses compilation with Fedora 30 + remove some warnings (#7160)

src/ExternLib/StatisticProcesses/MinMaxMeanStatisticProcess.cc
... ... @@ -14,7 +14,7 @@ namespace AMDA {
14 14 namespace Statistic {
15 15 namespace MinMaxMean {
16 16  
17   -MinStatisticProcess::MinStatisticProcess(AMDA::Parameters::Parameter &parameter, int index) :
  17 +MinStatisticProcess::MinStatisticProcess(AMDA::Parameters::Parameter &parameter, const int& index) :
18 18 AMDA::Parameters::StatisticProcess(parameter, false, index)
19 19 {
20 20 }
... ... @@ -35,7 +35,7 @@ std::string MinStatisticProcess::getUCD(void)
35 35 return "stat.min";
36 36 }
37 37  
38   -MaxStatisticProcess::MaxStatisticProcess(AMDA::Parameters::Parameter &parameter, int index) :
  38 +MaxStatisticProcess::MaxStatisticProcess(AMDA::Parameters::Parameter &parameter, const int& index) :
39 39 AMDA::Parameters::StatisticProcess(parameter, false, index)
40 40 {
41 41 }
... ... @@ -56,7 +56,7 @@ std::string MaxStatisticProcess::getUCD(void)
56 56 return "stat.max";
57 57 }
58 58  
59   -MeanStatisticProcess::MeanStatisticProcess(AMDA::Parameters::Parameter &parameter, int index) :
  59 +MeanStatisticProcess::MeanStatisticProcess(AMDA::Parameters::Parameter &parameter, const int& index) :
60 60 AMDA::Parameters::StatisticProcess(parameter, false,index)
61 61 {
62 62 }
... ...
src/ExternLib/StatisticProcesses/MinMaxMeanStatisticProcess.hh
... ... @@ -24,7 +24,7 @@ public:
24 24 /*
25 25 * @brief constructor
26 26 */
27   - MinStatisticProcess(AMDA::Parameters::Parameter &parameter, int index);
  27 + MinStatisticProcess(AMDA::Parameters::Parameter &parameter, const int& index);
28 28  
29 29 /*
30 30 * @brief destructor
... ... @@ -52,7 +52,7 @@ public:
52 52 /*
53 53 * @brief constructor
54 54 */
55   - MaxStatisticProcess(AMDA::Parameters::Parameter &parameter, int index);
  55 + MaxStatisticProcess(AMDA::Parameters::Parameter &parameter, const int& index);
56 56  
57 57 /*
58 58 * @brief destructor
... ... @@ -80,7 +80,7 @@ public:
80 80 /*
81 81 * @brief constructor
82 82 */
83   - MeanStatisticProcess(AMDA::Parameters::Parameter &parameter, int index);
  83 + MeanStatisticProcess(AMDA::Parameters::Parameter &parameter, const int& index);
84 84  
85 85 /*
86 86 * @brief destructor
... ...
src/ExternLib/StatisticProcesses/MinVarStatisticProcess.cc
... ... @@ -14,7 +14,7 @@ namespace AMDA {
14 14 namespace Statistic {
15 15 namespace MinVar {
16 16  
17   -MinVarStatisticProcess::MinVarStatisticProcess(AMDA::Parameters::Parameter &parameter, int index) :
  17 +MinVarStatisticProcess::MinVarStatisticProcess(AMDA::Parameters::Parameter &parameter, const int& index) :
18 18 AMDA::Parameters::StatisticProcess(parameter,true, index)
19 19 {
20 20 }
... ...
src/ExternLib/StatisticProcesses/MinVarStatisticProcess.hh
... ... @@ -24,7 +24,7 @@ public:
24 24 /*
25 25 * @brief constructor
26 26 */
27   - MinVarStatisticProcess(AMDA::Parameters::Parameter &parameter, int index);
  27 + MinVarStatisticProcess(AMDA::Parameters::Parameter &parameter, const int& index);
28 28  
29 29 /*
30 30 * @brief destructor
... ...
src/ExternLib/mex_imah_calculate/mex_imah_calculate.cc
... ... @@ -10,7 +10,7 @@ namespace Parameters {
10 10 float samplingTime = 0.1209;
11 11 float GeffH, GeffG;
12 12  
13   - for(unsigned int i = 0; i < Hsp.getDim1Size(); ++i) { // Different elevations number
  13 + for(int i = 0; i < Hsp.getDim1Size(); ++i) { // Different elevations number
14 14 std::vector<float> imaHVector = Hsp[i];
15 15 std::vector<float> imaGVector = Gsp[i];
16 16 for (unsigned int iEn = 0; iEn < 96; iEn++) {// 96 Energy Steps
... ... @@ -99,4 +99,4 @@ namespace Parameters {
99 99 return Gl;
100 100 }
101 101 }
102   -}
103 102 \ No newline at end of file
  103 +}
... ...
src/ExternLib/sum_into_table_indexes/SumIntoTableIndexes.hh
... ... @@ -54,7 +54,7 @@ public:
54 54 DataType output = 0;
55 55  
56 56 for (int i = _minIndex; i <= _maxIndex; ++i) {
57   - if ((i >= inputElt.size()) || isNAN(inputElt[i]))
  57 + if ((i >= (int)inputElt.size()) || isNAN(inputElt[i]))
58 58 continue;
59 59 output += inputElt[i];
60 60 }
... ...
src/Parameters/ServicesServer.hh
... ... @@ -51,7 +51,7 @@ typedef boost::function &lt; ParamOutput*() &gt; ParamOutputFactory;
51 51 typedef std::map<std::string, ParamOutputFactory> ParamOutputFactories;
52 52  
53 53 // StatisticProcess factory definition
54   -typedef boost::function < StatisticProcess*(Parameter &, int) > StatisticProcessFactory;
  54 +typedef boost::function < StatisticProcess*(Parameter &, const int&) > StatisticProcessFactory;
55 55 typedef std::map<std::string, StatisticProcessFactory> StatisticProcessFactories;
56 56  
57 57 class FileConfigurator;
... ...