diff options
-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 { |