WSL/SLF GitLab Repository

Commit 841eaf74 authored by Mathias Bavay's avatar Mathias Bavay
Browse files

More fixes so that all can be compiled with -Weffc++ (a few remain, but they are trickier to fix)

parent 330303ee
......@@ -21,7 +21,9 @@ using namespace std;
namespace mio {
FilterMax::FilterMax(const std::vector<std::string>& vec_args) : FilterBlock("MAX") {
FilterMax::FilterMax(const std::vector<std::string>& vec_args)
: FilterBlock("MAX"), max_val(0.), max_soft(0.), is_soft(true)
{
parse_args(vec_args);
properties.stage = ProcessingProperties::both; //for the rest: default values
}
......
......@@ -21,7 +21,9 @@ using namespace std;
namespace mio {
FilterMin::FilterMin(const std::vector<std::string>& vec_args) : FilterBlock("MIN") {
FilterMin::FilterMin(const std::vector<std::string>& vec_args)
: FilterBlock("MIN"), min_val(0.), min_soft(0.), is_soft(true)
{
parse_args(vec_args);
properties.stage = ProcessingProperties::both; //for the rest: default values
}
......
......@@ -21,7 +21,9 @@ using namespace std;
namespace mio {
FilterMinMax::FilterMinMax(const std::vector<std::string>& vec_args) : FilterBlock("MIN_MAX")
FilterMinMax::FilterMinMax(const std::vector<std::string>& vec_args)
: FilterBlock("MIN_MAX"), min_val(0.), max_val(0.), min_soft(0.), max_soft(0.), is_soft(true)
{
parse_args(vec_args);
properties.stage = ProcessingProperties::both; //for the rest: default values
......
......@@ -22,7 +22,7 @@ using namespace std;
namespace mio {
FilterRate::FilterRate(const std::vector<std::string>& vec_args) : FilterBlock("RATE")
FilterRate::FilterRate(const std::vector<std::string>& vec_args) : FilterBlock("RATE"), min_rate_of_change(0.), max_rate_of_change(0.)
{
parse_args(vec_args);
properties.stage = ProcessingProperties::both; //for the rest: default values
......
......@@ -21,7 +21,9 @@ using namespace std;
namespace mio {
FilterUnheatedHNW::FilterUnheatedHNW(const std::vector<std::string>& vec_args) : FilterBlock("UNHEATED_RAINGAUGE") {
FilterUnheatedHNW::FilterUnheatedHNW(const std::vector<std::string>& vec_args)
: FilterBlock("UNHEATED_RAINGAUGE"), thresh_rh(0.), thresh_Dt(0.), soft(true)
{
parse_args(vec_args);
properties.stage = ProcessingProperties::both; //for the rest: default values
}
......
......@@ -21,7 +21,8 @@ using namespace std;
namespace mio {
ProcAdd::ProcAdd(const std::vector<std::string>& vec_args) : ProcessingBlock("ADD") {
ProcAdd::ProcAdd(const std::vector<std::string>& vec_args) : ProcessingBlock("ADD"), offset(0.)
{
parse_args(vec_args);
properties.stage = ProcessingProperties::first; //for the rest: default values
}
......
......@@ -22,7 +22,8 @@ using namespace std;
namespace mio {
ProcExpSmoothing::ProcExpSmoothing(const std::vector<std::string>& vec_args) : WindowedFilter("EXP_SMOOTHING")
ProcExpSmoothing::ProcExpSmoothing(const std::vector<std::string>& vec_args)
: WindowedFilter("EXP_SMOOTHING"), alpha(.5)
{
parse_args(vec_args);
......
......@@ -21,7 +21,8 @@ using namespace std;
namespace mio {
ProcMult::ProcMult(const std::vector<std::string>& vec_args) : ProcessingBlock("MULT") {
ProcMult::ProcMult(const std::vector<std::string>& vec_args) : ProcessingBlock("MULT"), factor(1.)
{
parse_args(vec_args);
properties.stage = ProcessingProperties::first; //for the rest: default values
}
......
......@@ -23,7 +23,9 @@ using namespace std;
namespace mio {
ProcUndercatch_Hamon::ProcUndercatch_Hamon(const std::vector<std::string>& vec_args) : ProcessingBlock("UNDERCATCH_HAMON") {
ProcUndercatch_Hamon::ProcUndercatch_Hamon(const std::vector<std::string>& vec_args)
: ProcessingBlock("UNDERCATCH_HAMON"), type(sh)
{
parse_args(vec_args);
properties.stage = ProcessingProperties::first; //for the rest: default values
}
......
......@@ -25,9 +25,10 @@ namespace mio {
const double ProcUndercatch_WMO::Tsnow_WMO=-2., ProcUndercatch_WMO::Train_WMO=2.; //WMO values from Yan et al (2001)
ProcUndercatch_WMO::ProcUndercatch_WMO(const std::vector<std::string>& vec_args) : ProcessingBlock("UNDERCATCH_WMO") {
Tsnow = Tsnow_WMO;
Train = Train_WMO;
ProcUndercatch_WMO::ProcUndercatch_WMO(const std::vector<std::string>& vec_args)
: ProcessingBlock("UNDERCATCH_WMO"), type(cst),
factor_snow(1.3), factor_mixed(1.1), Tsnow(Tsnow_WMO), Train(Train_WMO)
{
parse_args(vec_args);
properties.stage = ProcessingProperties::first; //for the rest: default values
}
......
......@@ -28,7 +28,10 @@ const double ProcUnventilatedT::snow_albedo = .56; //white surface
const double ProcUnventilatedT::snow_thresh = .1; //if snow height greater than this threshold -> snow albedo
const double ProcUnventilatedT::vw_thresh = 0.1; //wind speed threshold
ProcUnventilatedT::ProcUnventilatedT(const std::vector<std::string>& vec_args) : ProcessingBlock("UNVENTILATED_T") {
ProcUnventilatedT::ProcUnventilatedT(const std::vector<std::string>& vec_args)
: ProcessingBlock("UNVENTILATED_T"), usr_albedo(dflt_albedo),
is_soft(true), nakamura(true)
{
parse_args(vec_args);
properties.stage = ProcessingProperties::first; //for the rest: default values
}
......
......@@ -47,13 +47,21 @@ namespace mio {
const double GeotopIO::plugin_nodata = -9999.0; //plugin specific nodata value
GeotopIO::GeotopIO(const std::string& configfile) : cfg(configfile), nr_of_stations(IOUtils::npos) {
IOUtils::getProjectionParameters(cfg, coordin, coordinparam, coordout, coordoutparam);
cfg.getValue("TIME_ZONE", "Input", in_tz, Config::nothrow);
cfg.getValue("TIME_ZONE", "Output", out_tz, Config::nothrow);
GeotopIO::GeotopIO(const std::string& configfile)
: cfg(configfile), in_tz(0.), out_tz(0.), nr_of_stations(IOUtils::npos),
fin(), fout(), vec_streampos(), vecStation(), mapColumnNames(),
coordin(), coordinparam(), coordout(), coordoutparam()
{
IOUtils::getProjectionParameters(cfg, coordin, coordinparam, coordout, coordoutparam);
cfg.getValue("TIME_ZONE", "Input", in_tz, Config::nothrow);
cfg.getValue("TIME_ZONE", "Output", out_tz, Config::nothrow);
}
GeotopIO::GeotopIO(const Config& cfgreader) : cfg(cfgreader), nr_of_stations(IOUtils::npos) {
GeotopIO::GeotopIO(const Config& cfgreader)
: cfg(cfgreader), in_tz(0.), out_tz(0.), nr_of_stations(IOUtils::npos),
fin(), fout(), vec_streampos(), vecStation(), mapColumnNames(),
coordin(), coordinparam(), coordout(), coordoutparam()
{
IOUtils::getProjectionParameters(cfg, coordin, coordinparam, coordout, coordoutparam);
cfg.getValue("TIME_ZONE", "Input", in_tz, Config::nothrow);
cfg.getValue("TIME_ZONE", "Output", out_tz, Config::nothrow);
......
......@@ -41,12 +41,14 @@ namespace mio {
const double GrassIO::plugin_nodata = -999.0; //plugin specific nodata value
GrassIO::GrassIO(const std::string& configfile) : cfg(configfile)
GrassIO::GrassIO(const std::string& configfile)
: cfg(configfile), fin(), fout(), coordin(), coordinparam(), coordout(), coordoutparam()
{
IOUtils::getProjectionParameters(cfg, coordin, coordinparam, coordout, coordoutparam);
}
GrassIO::GrassIO(const Config& cfgreader) : cfg(cfgreader)
GrassIO::GrassIO(const Config& cfgreader)
: cfg(cfgreader), fin(), fout(), coordin(), coordinparam(), coordout(), coordoutparam()
{
IOUtils::getProjectionParameters(cfg, coordin, coordinparam, coordout, coordoutparam);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment