WSL/SLF GitLab Repository

Commit 119fa04f authored by Mathias Bavay's avatar Mathias Bavay
Browse files

Some warnings have been fixed in the tests and all 'string tmp=""' or 'tmp=""'...

Some warnings have been fixed in the tests and all 'string tmp=""' or 'tmp=""' have been replaced by either an empty constructor (that does the same ) or tmp.clear() (that does the same too)
parent 378f14f8
......@@ -167,7 +167,7 @@ std::string Config::getSourceName() const
return sourcename;
}
size_t Config::findKeys(std::vector<std::string>& vecResult, std::string keystart,
size_t Config::findKeys(std::vector<std::string>& vecResult, const std::string keystart,
std::string section) const
{
vecResult.clear();
......@@ -175,13 +175,10 @@ size_t Config::findKeys(std::vector<std::string>& vecResult, std::string keystar
if (section.length() == 0) //enforce the default section if user tries to give empty section string
section = defaultSection;
IOUtils::toUpper(section);
IOUtils::toUpper(keystart);
const string tmp_keystart = section + "::" + keystart;
const string tmp_keystart = IOUtils::strToUpper(section) + "::" + IOUtils::strToUpper(keystart);
//Loop through keys, look for substring match - push it into vecResult
map<string,string>::const_iterator it;
for (it=properties.begin(); it != properties.end(); it++){
for (map<string,string>::const_iterator it=properties.begin(); it != properties.end(); it++){
const string tmp = (it->first).substr(0, tmp_keystart.length());
const int matchcount = tmp_keystart.compare(tmp);
......@@ -199,7 +196,7 @@ std::string Config::extract_section(std::string& key)
const string::size_type pos = key.find("::");
if (pos != string::npos){
string sectionname = key.substr(0, pos);
const string sectionname = key.substr(0, pos);
key.erase(key.begin(), key.begin() + pos + 2); //delete section name
return sectionname;
}
......@@ -215,10 +212,9 @@ void Config::write(const std::string& filename)
throw FileAccessException(filename, AT);
try {
map<string,string>::const_iterator it;
string current_section = "";
string current_section;
unsigned int sectioncount = 0;
for (it=properties.begin(); it != properties.end(); it++){
for (map<string,string>::const_iterator it=properties.begin(); it != properties.end(); it++){
string tmp = it->first;
const string section = extract_section(tmp);
......
......@@ -263,7 +263,7 @@ class Config {
* @endcode
*/
size_t findKeys(std::vector<std::string>& vecResult,
std::string keystart, std::string section="GENERAL") const;
const std::string keystart, std::string section="GENERAL") const;
static const std::string defaultSection;
......
......@@ -725,7 +725,7 @@ void Coords::setEPSG(const int epsg) {
if(!found && (epsg==21781)) {
coord_sys="CH1903";
coord_param="";
coord_param.clear();
found=true;
}
if(!found && (epsg>=32601) && (epsg<=32660)) {
......
......@@ -220,7 +220,7 @@ IOHandler& IOHandler::operator=(const IOHandler& source) {
IOInterface* IOHandler::getPlugin(const std::string& cfgkey, const std::string& cfgsection)
{
std::string op_src="";
std::string op_src;
cfg.getValue(cfgkey, cfgsection, op_src);
std::map<std::string, IOPlugin>::iterator mapit = mapPlugins.find(op_src);
......@@ -345,8 +345,8 @@ void IOHandler::parse_copy_config()
const size_t nrOfMatches = cfg.findKeys(copy_keys, "COPY::", "Input");
for (size_t ii=0; ii<nrOfMatches; ii++) {
string initial_name = "";
const string name_of_copy = copy_keys[ii].substr(6);
string initial_name;
cfg.getValue(copy_keys[ii], "Input", initial_name);
if ((name_of_copy.length() > 0) && (initial_name.length() > 0)){
......
......@@ -168,7 +168,7 @@ void trim(std::string& str)
if(startpos!=std::string::npos && endpos!=std::string::npos) {
str = str.substr( startpos, endpos-startpos+1 );
} else {
str = "";
str.clear();
}
}
......@@ -356,7 +356,7 @@ void readKeyValueHeader(std::map<std::string,std::string>& headermap,
const std::string& delimiter)
{
size_t linenr = 0;
std::string line="";
std::string line;
//make a test for end of line encoding:
const char eol = getEoln(fin);
......@@ -454,7 +454,7 @@ size_t readLineToVec(const std::string& line_in, std::vector<std::string>& vecSt
if (tmp_string != "") {
vecString.push_back(tmp_string);
}
tmp_string="";
tmp_string.clear();
}
return vecString.size();
......@@ -535,7 +535,7 @@ template<> bool convertString<unsigned int>(unsigned int& t, const std::string&
//Conversion failed
return false;
}
std::string tmp="";
std::string tmp;
getline(iss, tmp); //get rest of line, if any
trim(tmp);
if ((tmp.length() > 0) && tmp[0] != '#' && tmp[0] != ';') {
......
......@@ -129,7 +129,7 @@ string Meteo1DInterpolator::getInterpolationForParameter(const std::string& parn
vecArguments.clear();
cfg.getValue(parname+"::args", "Interpolations1D", vecArguments, Config::nothrow);
std::string tmp = "";
std::string tmp;
cfg.getValue(parname+"::resample", "Interpolations1D", tmp, Config::nothrow);
if (tmp.length() > 0)
......
......@@ -106,7 +106,7 @@ void SMETCommon::trim(std::string& str)
// if all spaces or empty return an empty string
if(( std::string::npos == startpos ) || ( std::string::npos == endpos)) {
str = "";
str.clear();
} else {
str = str.substr( startpos, endpos-startpos+1 );
}
......@@ -215,7 +215,7 @@ size_t SMETCommon::readLineToVec(const std::string& line_in, std::vector<std::st
if (tmp_string != "") {
vec_string.push_back(tmp_string);
}
tmp_string="";
tmp_string.clear();
}
return vec_string.size();
......@@ -654,7 +654,7 @@ void SMETWriter::set_precision(const std::vector<int>& vec_precision)
SMETReader::SMETReader(const std::string& in_fname) :
data_start_fpointer(), vec_offset(), vec_multiplier(), vec_fieldnames(),
header(), map_timestamp_streampos(), map_julian_streampos(),
header(), indexer(),
filename(in_fname), timestamp_start("-4714-11-24T00:00"),
timestamp_end("9999-12-31T00:00"), nodata_value(-999.),
julian_start(0.), julian_end(5373483.5),
......@@ -758,7 +758,7 @@ void SMETReader::process_header()
if (it->first == "fields"){
SMETCommon::readLineToVec(it->second, tmp_vec);
string newfields = "";
string newfields;
if (tmp_vec.size() > 0){
for (size_t ii=0; ii<tmp_vec.size(); ii++){
if (tmp_vec[ii] == "timestamp"){
......@@ -811,7 +811,7 @@ void SMETReader::process_header()
if (get_header_value("units_offset") != ""){
vector<string> tmp_offset;
string offsetstring = "";
string offsetstring;
SMETCommon::readLineToVec(get_header_value("units_offset"), tmp_offset);
for (size_t ii=0; ii<tmp_offset.size(); ii++){
......@@ -828,7 +828,7 @@ void SMETReader::process_header()
if (get_header_value("units_multiplier") != ""){
vector<string> tmp_multiplier;
string multiplierstring = "";
string multiplierstring;
SMETCommon::readLineToVec(get_header_value("units_multiplier"), tmp_multiplier);
for (size_t ii=0; ii<tmp_multiplier.size(); ii++){
......@@ -867,7 +867,7 @@ void SMETReader::process_header()
void SMETReader::read_header(std::ifstream& fin)
{
//1. Read signature
std::string line = "";
std::string line;
vector<string> tmpvec;
getline(fin, line, eoln); //read complete signature line
SMETCommon::stripComments(line);
......@@ -983,13 +983,17 @@ void SMETReader::read(std::vector<std::string>& vec_timestamp, std::vector<doubl
try {
fin.seekg(data_start_fpointer); //jump to data start position in the file
if (timestamp_interval && timestamp_present){
map<string, streampos>::const_iterator it = map_timestamp_streampos.find(timestamp_start);
const streampos fpointer = indexer.getIndex(timestamp_start);
if(fpointer!=-1) fin.seekg(fpointer);
/*map<string, streampos>::const_iterator it = map_timestamp_streampos.find(timestamp_start);
if ( it != map_timestamp_streampos.end())
fin.seekg(it->second);
fin.seekg(it->second);*/
} else if (julian_interval && julian_present){
map<double, streampos>::const_iterator it = map_julian_streampos.find(julian_start);
const streampos fpointer = indexer.getIndex(julian_start);
if(fpointer!=-1) fin.seekg(fpointer);
/*map<double, streampos>::const_iterator it = map_julian_streampos.find(julian_start);
if ( it != map_julian_streampos.end())
fin.seekg(it->second);
fin.seekg(it->second);*/
}
if (fin.fail() || fin.bad())
......@@ -1029,9 +1033,11 @@ void SMETReader::read(std::vector<double>& vec_data)
try {
fin.seekg(data_start_fpointer); //jump to data start position in the file
if (julian_interval && julian_present){
map<double, streampos>::const_iterator it = map_julian_streampos.find(julian_start);
const streampos fpointer = indexer.getIndex(julian_start);
if(fpointer!=-1) fin.seekg(fpointer);
/*map<double, streampos>::const_iterator it = map_julian_streampos.find(julian_start);
if ( it != map_julian_streampos.end())
fin.seekg(it->second);
fin.seekg(it->second);*/
}
if (fin.fail() || fin.bad())
......@@ -1051,16 +1057,14 @@ void SMETReader::read(std::vector<double>& vec_data)
void SMETReader::read_data_ascii(std::ifstream& fin, std::vector<std::string>& vec_timestamp, std::vector<double>& vec_data)
{
size_t nr_of_data_fields = nr_of_fields;
if (timestamp_present) nr_of_data_fields++;
const size_t nr_of_data_fields = (timestamp_present)? nr_of_fields+1 : nr_of_fields;
vector<string> tmp_vec;
string line;
streampos current_fpointer = -1;
streampos current_fpointer = (streampos)-1;
while (!fin.eof()){
line = "";
const streampos tmp_fpointer = fin.tellg();
line.clear();
getline(fin, line, eoln);
SMETCommon::stripComments(line);
SMETCommon::trim(line);
......@@ -1113,9 +1117,11 @@ void SMETReader::read_data_ascii(std::ifstream& fin, std::vector<std::string>& v
if (current_fpointer != static_cast<streampos>(-1)){
if (timestamp_interval && timestamp_present)
map_timestamp_streampos[timestamp_end] = current_fpointer;
indexer.setIndex(timestamp_end, current_fpointer);
/*map_timestamp_streampos[timestamp_end] = current_fpointer;*/
else if (julian_interval && julian_present)
map_julian_streampos[julian_end] = current_fpointer;
indexer.setIndex(julian_end, current_fpointer);
/*map_julian_streampos[julian_end] = current_fpointer;*/
}
}
......@@ -1132,7 +1138,7 @@ void SMETReader::read_data_binary(std::ifstream& fin, std::vector<double>& vec_d
} else {
float tmpval;
fin.read(reinterpret_cast < char * > (&tmpval), sizeof(float));
double val = (double)tmpval;
const double val = (double)tmpval;
vec_data.push_back(val);
}
......@@ -1166,7 +1172,8 @@ void SMETReader::read_data_binary(std::ifstream& fin, std::vector<double>& vec_d
if (current_fpointer != static_cast<streampos>(-1)){
if (julian_interval && julian_present)
map_julian_streampos[julian_end] = current_fpointer;
indexer.setIndex(julian_end, current_fpointer);
/*map_julian_streampos[julian_end] = current_fpointer;*/
}
}
......
......@@ -18,6 +18,8 @@
#ifndef __LIBSMET_H__
#define __LIBSMET_H__
#include <meteoio/IOUtils.h> //HACK: move FileIndexer in a plugins specific file
#include <cmath>
#include <string>
#include <sstream>
......@@ -223,8 +225,7 @@ class SMETReader {
std::vector<double> vec_multiplier; //a multiplier for every column, except timestamp
std::vector<std::string> vec_fieldnames; //holds the column names, except for timestamp column
std::map< std::string, std::string > header; //holds the header
std::map<std::string, std::streampos> map_timestamp_streampos; //in order to save file pointers
std::map<double, std::streampos> map_julian_streampos; //in order to save file pointers
mio::IOUtils::FileIndexer indexer; //in order to save file pointers
std::string filename;
std::string timestamp_start, timestamp_end; //the beginning and end date of the current timestamp_interval
......
......@@ -267,7 +267,7 @@ void A3DIO::read1DStation(std::string& file_1d, StationData& sd)
void A3DIO::read1DMeteo(const Date& dateStart, const Date& dateEnd, std::vector< std::vector<MeteoData> >& vecMeteo)
{
std::string file_1d="", line="";
std::string file_1d, line;
Date tmp_date;
MeteoData tmpdata;
......@@ -534,7 +534,7 @@ void A3DIO::constructMeteo2DFilenames(const Date& startDate, const Date& endDate
size_t A3DIO::getNrOfStations(std::vector<std::string>& filenames, std::map<std::string, size_t>& hashStations)
{
std::vector<std::string> tmpvec;
std::string line_in="";
std::string line_in;
for (size_t ii=0; ii<filenames.size(); ii++) {
std::string filename = filenames[ii];
......@@ -543,7 +543,7 @@ size_t A3DIO::getNrOfStations(std::vector<std::string>& filenames, std::map<std:
fin.open (filename.c_str(), std::ifstream::in);
if (fin.fail()) throw FileAccessException(filename, AT);
char eoln = IOUtils::getEoln(fin); //get the end of line character for the file
const char eoln = IOUtils::getEoln(fin); //get the end of line character for the file
IOUtils::skipLines(fin, 4, eoln);
getline(fin, line_in, eoln); //5th line holds the names of the stations
......@@ -568,7 +568,7 @@ void A3DIO::read2DMeteoData(const std::string& filename, const std::string& para
std::vector< std::vector<MeteoData> >& vecM, size_t& bufferindex)
{
std::string line_in = "";
std::string line_in;
std::vector<std::string> tmpvec, vec_names;
Date tmp_date;
int tmp_ymdh[4];
......@@ -622,7 +622,7 @@ void A3DIO::read2DMeteoData(const std::string& filename, const std::string& para
if (tmp_date == currentMeteoData.date) {
//Read in data
for (size_t ii=4; ii<columns; ii++) {
size_t stationnr = hashStations[vec_names.at(ii)];
const size_t stationnr = hashStations[vec_names.at(ii)];
MeteoData& tmpmd = vecM[stationnr][bufferindex];
tmpmd.date = tmp_date;
......@@ -667,7 +667,7 @@ void A3DIO::read2DMeteoData(const std::string& filename, const std::string& para
void A3DIO::read2DMeteoHeader(const std::string& filename, std::map<std::string,size_t>& hashStations,
std::vector<StationData>& vecS)
{
std::string line_in = "";
std::string line_in;
std::vector<std::string> vec_altitude, vec_xcoord, vec_ycoord, vec_names;
fin.clear();
......@@ -739,7 +739,7 @@ void A3DIO::read2DMeteoHeader(const std::string& filename, std::map<std::string,
void A3DIO::readSpecialPoints(std::vector<Coords>& pts)
{
std::string filename="", line_in="";
std::string filename, line_in;
cfg.getValue("SPECIALPTSFILE", "Input", filename);
if (!IOUtils::fileExists(filename)) {
......
......@@ -128,22 +128,22 @@ ARCIO::ARCIO(const Config& cfgreader)
}
void ARCIO::getGridPaths() {
grid2dpath_in="", grid2dpath_out="";
string tmp="";
grid2dpath_in.clear(), grid2dpath_out.clear();
string tmp;
cfg.getValue("GRID2D", "Input", tmp, Config::nothrow);
if (tmp == "ARC") //keep it synchronized with IOHandler.cc for plugin mapping!!
cfg.getValue("GRID2DPATH", "Input", grid2dpath_in);
tmp="";
tmp.clear();
cfg.getValue("GRID2D", "Output", tmp, Config::nothrow);
if (tmp == "ARC") //keep it synchronized with IOHandler.cc for plugin mapping!!
cfg.getValue("GRID2DPATH", "Output", grid2dpath_out);
grid2d_ext_in = ".asc";
cfg.getValue("GRID2DEXT", "Input", grid2d_ext_in, Config::nothrow);
if(grid2d_ext_in=="none") grid2d_ext_in="";
if(grid2d_ext_in=="none") grid2d_ext_in.clear();
grid2d_ext_out = ".asc";
cfg.getValue("GRID2DEXT", "Output", grid2d_ext_out, Config::nothrow);
if(grid2d_ext_out=="none") grid2d_ext_out="";
if(grid2d_ext_out=="none") grid2d_ext_out.clear();
}
ARCIO::~ARCIO() throw()
......@@ -167,7 +167,7 @@ void ARCIO::read2DGrid_internal(Grid2DObject& grid_out, const std::string& full_
unsigned int ncols, nrows;
double xllcorner, yllcorner, cellsize, plugin_nodata;
double tmp;
std::string line="";
std::string line;
std::map<std::string, std::string> header; // A map to save key value pairs of the file header
if (!IOUtils::validFileName(full_name)) {
......@@ -254,7 +254,7 @@ void ARCIO::read2DGrid(Grid2DObject& grid_out, const std::string& filename) {
void ARCIO::read2DGrid(Grid2DObject& grid_out, const MeteoGrids::Parameters& parameter, const Date& date)
{
if(a3d_view_in) {
string ext="";
string ext;
if(parameter==MeteoGrids::HS)
ext="sdp";
else {
......@@ -271,14 +271,14 @@ void ARCIO::read2DGrid(Grid2DObject& grid_out, const MeteoGrids::Parameters& par
void ARCIO::readDEM(DEMObject& dem_out)
{
string filename="";
string filename;
cfg.getValue("DEMFILE", "Input", filename);
read2DGrid_internal(dem_out, filename);
}
void ARCIO::readLanduse(Grid2DObject& landuse_out)
{
string filename="";
string filename;
cfg.getValue("LANDUSEFILE", "Input", filename);
read2DGrid_internal(landuse_out, filename);
}
......@@ -287,7 +287,7 @@ void ARCIO::readAssimilationData(const Date& date_in, Grid2DObject& da_out)
{
int yyyy, MM, dd, hh, mm;
date_in.getDate(yyyy, MM, dd, hh, mm);
string filepath="";
string filepath;
cfg.getValue("DAPATH", "Input", filepath);
......@@ -366,7 +366,7 @@ void ARCIO::write2DGrid(const Grid2DObject& grid_in, const MeteoGrids::Parameter
{
//the path will be added by write2DGrid
if(a3d_view_out) {
string ext="";
string ext;
if(parameter==MeteoGrids::HS) {
ext="sdp";
} else if(parameter==MeteoGrids::DEM) {
......
......@@ -92,7 +92,7 @@ ARPSIO& ARPSIO::operator=(const ARPSIO& source) {
void ARPSIO::setOptions()
{
string tmp="";
string tmp;
cfg.getValue("GRID2D", "Input", tmp, Config::nothrow);
if (tmp == "ARPS") { //keep it synchronized with IOHandler.cc for plugin mapping!!
cfg.getValue("GRID2DPATH", "Input", grid2dpath_in);
......@@ -103,7 +103,7 @@ void ARPSIO::setOptions()
//default value has been set in constructor
cfg.getValue("GRID2DEXT", "Input", ext, Config::nothrow);
if(ext=="none") ext="";
if(ext=="none") ext.clear();
}
ARPSIO::~ARPSIO() throw()
......
......@@ -146,11 +146,11 @@ void BormaIO::readStationNames()
vecStationName.clear();
size_t counter = 1;
string stationname = "";
string stationname;
do {
stringstream ss;
stationname = "";
stationname.clear();
ss << "STATION" << counter;
cfg.getValue(ss.str(), "Input", stationname, Config::nothrow);
......@@ -168,7 +168,7 @@ void BormaIO::getFiles(const std::string& stationname, const Date& start_date, c
std::vector<std::string>& vecFiles, std::vector<Date>& vecDate)
{
std::list<std::string> dirlist = std::list<std::string>();
std::string xmlpath="";
std::string xmlpath;
cfg.getValue("METEOPATH", "Input", xmlpath);
vecFiles.clear();
......
......@@ -119,7 +119,7 @@ void CosmoXMLIO::readAssimilationData(const Date& /*date_in*/, Grid2DObject& /*d
void CosmoXMLIO::readStationData(const Date& station_date, std::vector<StationData>& vecStation)
{
//Get all files from directory
string meteopath = "", station_path="";
string meteopath, station_path;
cfg.getValue("METEOPATH", "Input", meteopath);
if (meteopath == "")
throw ConversionFailedException("Error while reading value for METEOPATH", AT);
......@@ -137,7 +137,7 @@ void CosmoXMLIO::readStationData(const Date& station_date, std::vector<StationDa
StationData sd;
//Initialize variables
double altitude=IOUtils::nodata, latitude=IOUtils::nodata, longitude=IOUtils::nodata;
string station_name="", station_ID="";
string station_name, station_ID;
bool is_first=true;
Date first_date=IOUtils::nodata, last_date=IOUtils::nodata, date_read=IOUtils::nodata;
......@@ -268,7 +268,7 @@ void CosmoXMLIO::readMeteoData(const Date& dateStart, const Date& dateEnd,
const size_t&)
{
//Get all files from directory
string meteopath = "", station_path="";
string meteopath, station_path;
cfg.getValue("METEOPATH", "Input", meteopath);
if (meteopath == "")
throw ConversionFailedException("Error while reading value for METEOPATH", AT);
......
......@@ -148,7 +148,7 @@ void GRIBIO::setOptions()
std::string coordout, coordoutparam;
IOUtils::getProjectionParameters(cfg, coordin, coordinparam, coordout, coordoutparam);
string tmp="";
string tmp;
cfg.getValue("GRID2D", "Input", tmp, Config::nothrow);
if (tmp == "GRIB") { //keep it synchronized with IOHandler.cc for plugin mapping!!
cfg.getValue("GRID2DPATH", "Input", grid2dpath_in);
......@@ -157,10 +157,10 @@ void GRIBIO::setOptions()
cfg.getValue("GRID2DPREFIX", "Input", grid2d_prefix, Config::nothrow);
cfg.getValue("METEOEXT", "Input", meteo_ext, Config::nothrow);
if(meteo_ext=="none") meteo_ext="";
if(meteo_ext=="none") meteo_ext.clear();
cfg.getValue("GRID2DEXT", "Input", grid2d_ext, Config::nothrow);
if(grid2d_ext=="none") grid2d_ext="";
if(grid2d_ext=="none") grid2d_ext.clear();
}
void GRIBIO::readStations(std::vector<Coords> &vecPoints)
......@@ -169,7 +169,7 @@ void GRIBIO::readStations(std::vector<Coords> &vecPoints)
size_t current_stationnr = 1;
string current_station;
do {
current_station = "";
current_station.clear();
stringstream ss;
ss << "STATION" << current_stationnr;
cfg.getValue(ss.str(), "Input", current_station, Config::nothrow);
......@@ -1089,7 +1089,7 @@ void GRIBIO::cleanup() throw()
{
if(fp!=NULL) fclose(fp); fp=NULL;
if(idx!=NULL) grib_index_delete(idx); idx=NULL;
idx_filename="";
idx_filename.clear();
}
} //namespace
......@@ -99,7 +99,7 @@ GSNIO::~GSNIO() throw(){}
void GSNIO::initGSNConnection(){
//default timezone
string tmp_timezone = "";
string tmp_timezone;
cfg.getValue("TIME_ZONE", "Input", tmp_timezone, Config::nothrow);
if (tmp_timezone != ""){
IOUtils::convertString(default_timezone, tmp_timezone);
......@@ -462,7 +462,7 @@ void GSNIO::readStationNames()
size_t current_stationnr = 1;
string current_station;
do {
current_station = "";
current_station.clear();
stringstream ss;
ss << "STATION" << current_stationnr;
cfg.getValue(ss.str(), "Input", current_station, Config::nothrow);
......
......@@ -57,7 +57,7 @@ GeotopIO::GeotopIO(const std::string& configfile)
cfg.getValue("TIME_ZONE", "Output", out_tz, Config::nothrow);
}
GeotopIO::GeotopIO(const Config& cfgreader)
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()
......@@ -115,7 +115,7 @@ void GeotopIO::initParamNames(std::map<std::string, size_t>& mapParam) {
void GeotopIO::writeMeteoData(
const std::vector<std::vector<MeteoData> >& vecMeteo,
const std::string&) {
string path = "";
string path;
vector<string> vecSequence;
vector<int> ymdhm = vector<int> (5);
map<string, size_t> mapParam;
......@@ -203,7 +203,7 @@ void GeotopIO::writeMeteoData(
}
void GeotopIO::readStationData(const Date&, std::vector<StationData>& vecMeta) {
string metafile="";
string metafile;
vecMeta.clear();
if (vecStation.size() == 0) {
......@@ -217,7 +217,7 @@ void GeotopIO::readStationData(const Date&, std::vector<StationData>& vecMeta) {
void GeotopIO::readMeteoData(const Date& dateStart, const Date& dateEnd,
std::vector<std::vector<MeteoData> >& vecMeteo, const size_t& /*stationindex*/) {
vector<std::string> tmpvec;
string line = "", filename = "", path = "", prefix = "", metafile="";
string line, filename, path, prefix, metafile;
vecMeteo.clear();
cfg.getValue("METEOPATH", "Input", path);
......@@ -393,11 +393,9 @@ void GeotopIO::parseMetaData(const std::string& head, const std::string& datastr
}
void GeotopIO::readMetaData(const std::string& metafile) {
std::string line = "";
std::string<