mirror of
https://github.com/mangosfour/server.git
synced 2025-12-17 16:37:00 +00:00
[8395] Improved TimeStringToSecs
This commit is contained in:
parent
9eb5a3eea1
commit
4d0eee5393
2 changed files with 2 additions and 6 deletions
|
|
@ -135,12 +135,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
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "8394"
|
#define REVISION_NR "8395"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue