mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 18:15:31 +01:00
[8395] Improved TimeStringToSecs Author: arrai
--HG-- branch : trunk
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user