|
1 | 1 | #include <cstdlib> |
| 2 | +#include <string> |
| 3 | +#include <stdexcept> |
2 | 4 | #include "Variables.hpp" |
3 | 5 | #include "modules/CM.hpp" |
4 | 6 | #include "modules/BF.hpp" |
@@ -305,9 +307,9 @@ void Variables::readParam(const std::string& fname, |
305 | 307 | if (fname.empty()) |
306 | 308 | return; |
307 | 309 | std::cout << "PARAMETER FILE PROVIDED: " << fname << std::endl; |
308 | | -#define convD(x) static_cast<double>(stof(x, nullptr)) |
309 | | -#define convI(x) stoi(x, nullptr) |
310 | | -#define convB(x) ((bool)(stoi(x, nullptr))) |
| 310 | +#define convD(x) static_cast<double>(std::stof(x, nullptr)) |
| 311 | +#define convI(x) std::stoi(x, nullptr) |
| 312 | +#define convB(x) ((bool)(std::stoi(x, nullptr))) |
311 | 313 | #define setInputVar(dst, x, dummy) this-> dst = x |
312 | 314 | #define setModVar(dst, x, mod) modules::mod::set ## dst(x) |
313 | 315 | #define assign(src, dst, set, conv, ...) \ |
@@ -405,8 +407,8 @@ void Variables::readGRN(const std::string& fname) { |
405 | 407 | } else if (i == 36) { |
406 | 408 | modules::BF::setcNADPHsyn(iVfactor); |
407 | 409 | } else { |
408 | | - throw std::runtime_error("More GlymaIDs than expected " |
409 | | - " (expected <= 37, provided " |
| 410 | + throw std::runtime_error(std::string("More GlymaIDs than expected " |
| 411 | + " (expected <= 37, provided ") |
410 | 412 | + std::to_string(glymaID_order.size()) |
411 | 413 | + ")"); |
412 | 414 | } |
|
0 commit comments