summaryrefslogtreecommitdiffstats
path: root/src/ui/edit.cpp
diff options
context:
space:
mode:
authorerihel <erihel@gmail.com>2013-03-17 23:16:26 +0100
committererihel <erihel@gmail.com>2013-03-17 23:16:26 +0100
commit4abcaae0f718ab861fcde194250b7ffe3bf1c521 (patch)
treeeeff061f9b67fc3e3b2eb43b8492ce726a5e957b /src/ui/edit.cpp
parent21de71f871bc5add11235de2c86b9f08237591b7 (diff)
downloadcolobot-4abcaae0f718ab861fcde194250b7ffe3bf1c521.tar.gz
colobot-4abcaae0f718ab861fcde194250b7ffe3bf1c521.tar.bz2
colobot-4abcaae0f718ab861fcde194250b7ffe3bf1c521.zip
* Changes std::stoi to atoi as gcc does not support it on windows platform
Diffstat (limited to 'src/ui/edit.cpp')
-rw-r--r--src/ui/edit.cpp8
1 files changed, 1 insertions, 7 deletions
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<unsigned int>(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;