diff options
author | megamage <none@none> | 2009-08-24 18:59:46 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-08-24 18:59:46 -0500 |
commit | 978d139932955fd8657f396f4774578bdaf337c9 (patch) | |
tree | 581858ad6a734e0ffcea582b37e19559a8b73db0 /src/shared/Util.cpp | |
parent | 8dcfa4302b876263cdde5914c6d210f6f4f93455 (diff) |
[8395] Improved TimeStringToSecs Author: arrai
--HG--
branch : trunk
Diffstat (limited to 'src/shared/Util.cpp')
-rw-r--r-- | src/shared/Util.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/shared/Util.cpp b/src/shared/Util.cpp index 5b52857f55a..c0c8dc62b9d 100644 --- a/src/shared/Util.cpp +++ b/src/shared/Util.cpp @@ -193,12 +193,8 @@ uint32 TimeStringToSecs(const std::string& timestring) { if(isdigit(*itr)) { - std::string str; //very complicated typecast char->const char*; is there no better way? - str += *itr; - const char* tmp = str.c_str(); - buffer*=10; - buffer+=atoi(tmp); + buffer+= (*itr)-'0'; } else { |