[8395] Improved TimeStringToSecs Author: arrai

--HG--
branch : trunk
This commit is contained in:
megamage
2009-08-24 18:59:46 -05:00
parent 8dcfa4302b
commit 978d139932
+1 -5
View File
@@ -193,12 +193,8 @@ uint32 TimeStringToSecs(const std::string& timestring)
{ {
if(isdigit(*itr)) 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*=10;
buffer+=atoi(tmp); buffer+= (*itr)-'0';
} }
else else
{ {