stoi was introduced in C++11. replace with stringstream

issue#70
Houtan Bastani 2016-11-21 11:30:09 +01:00 committed by Stéphane Adjemian (Charybdis)
parent f45575fb74
commit 53d0792712
1 changed files with 4 additions and 1 deletions

View File

@ -2389,7 +2389,10 @@ ParsingDriver::add_expectation(string *arg1, expr_t arg2)
expr_t
ParsingDriver::add_var_expectation(string *arg1, string *arg2, string *arg3)
{
expr_t varExpectationNode = data_tree->AddVarExpectation(mod_file->symbol_table.getID(*arg1), stoi(*arg2), *arg3);
stringstream ss(*arg2);
int forecast_horizon;
ss >> forecast_horizon;
expr_t varExpectationNode = data_tree->AddVarExpectation(mod_file->symbol_table.getID(*arg1), forecast_horizon, *arg3);
delete arg2;
return varExpectationNode;
}