From 4abcaae0f718ab861fcde194250b7ffe3bf1c521 Mon Sep 17 00:00:00 2001 From: erihel Date: Sun, 17 Mar 2013 23:16:26 +0100 Subject: * Changes std::stoi to atoi as gcc does not support it on windows platform --- src/ui/edit.cpp | 8 +------- src/ui/edit.h | 1 + 2 files changed, 2 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/ui/edit.cpp b/src/ui/edit.cpp index a96d231..5ae7162 100644 --- a/src/ui/edit.cpp +++ b/src/ui/edit.cpp @@ -1408,13 +1408,7 @@ int GetValueParam(std::string cmd, int rank) int return_value = 0; if (results.size() > static_cast(rank)) { - try { - return_value = std::stoi(results.at(rank)); - } catch (std::invalid_argument &e) { - GetLogger()->Error("Exception std::invalid_argument caught in GetValueParam function"); - } catch (std::out_of_range &e) { - GetLogger()->Error("Exception std::out_of_range caught in GetValueParam function"); - } + return_value = atoi(results.at(rank).c_str()); } return return_value; diff --git a/src/ui/edit.h b/src/ui/edit.h index 72423fa..8b84fcd 100644 --- a/src/ui/edit.h +++ b/src/ui/edit.h @@ -36,6 +36,7 @@ #include #include +#include #include #include -- cgit v1.2.3-1-g7c22