Commit 76a933f6 authored by Laurent Belcour's avatar Laurent Belcour

Working windows version

parent e6f2c0b7
......@@ -74,14 +74,14 @@ class arguments
float get_float(const std::string& key, float default_value = 0.0f) const
{
if(_map.count(key) > 0)
return atof(_map.at(key).c_str()) ;
return atof(_map.find(key)->second.c_str()) ;
else
return default_value ;
}
int get_int(const std::string& key, int default_value = 0) const
{
if(_map.count(key) > 0)
return atoi(_map.at(key).c_str()) ;
return atoi(_map.find(key)->second.c_str()) ;
else
return default_value ;
}
......@@ -90,7 +90,7 @@ class arguments
vec res(size);
if(_map.count(key) > 0)
{
std::string s = _map.at(key);
std::string s = _map.find(key)->second;
if(s[0] == '\[') // Is an array of type [a, b, c]
{
int i = 0;
......
......@@ -130,7 +130,7 @@ function* plugins_manager::get_function(const std::string& n) const
}
else
{
return _functions.at(n) ;
return _functions.find(n)->second ;
}
}
data* plugins_manager::get_data(const std::string& n) const
......@@ -143,7 +143,7 @@ data* plugins_manager::get_data(const std::string& n) const
else
{
std::cout << "<<DEBUG>> using \"" << n << "\" data loader" << std::endl ;
return _datas.at(n) ;
return _datas.find(n)->second ;
}
}
fitter* plugins_manager::get_fitter(const std::string& n) const
......@@ -155,6 +155,6 @@ fitter* plugins_manager::get_fitter(const std::string& n) const
else
{
std::cout << "<<DEBUG>> using \"" << n << "\"" << std::endl ;
return _fitters.at(n) ;
return _fitters.find(n)->second ;
}
}
......@@ -369,7 +369,7 @@ void rational_function::save_cpp(const std::string& filename, const arguments& a
file << "{" << std::endl;
file << "\tdouble p = ";
for(int i=0; i<a.size(); ++i)
for(unsigned int i=0; i<a.size(); ++i)
{
if(i > 0 && a[i] >= 0.0)
{
......@@ -380,7 +380,7 @@ void rational_function::save_cpp(const std::string& filename, const arguments& a
file << ";" << std::endl;
file << "\tdouble q = ";
for(int i=0; i<b.size(); ++i)
for(unsigned int i=0; i<b.size(); ++i)
{
if(i > 0)
file << " + ";
......@@ -423,8 +423,8 @@ void rational_function::save_rational_function(const std::string& filename) cons
file << "#NQ " << b.size() / _nY << std::endl ;
file << "#BASIS poly" << std::endl ;
int np = a.size() / _nY ;
int nq = b.size() / _nX ;
unsigned int np = a.size() / _nY ;
unsigned int nq = b.size() / _nX ;
for(int k=0; k<_nY; ++k)
{
for(unsigned int i=0; i<np; ++i)
......
Markdown is supported
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