mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
[7918] Improve portability in work with uint64 string format specifiers and in code literals.
* Replace platform seelction MaNGOS code for select format descriptor for uint64 by using ACE define. I64FMTD renamed to UI64FMTD for more clear name. * Add new define UI64LIT (base at ACE seelction) for build portables uint64 literals. Please always use UI64LIT(0x00001) instead less portable 0x00001LL
This commit is contained in:
parent
e8cd008005
commit
2a27a44e2a
36 changed files with 372 additions and 362 deletions
|
|
@ -1372,7 +1372,7 @@ void World::SetInitialWorldSettings()
|
|||
sprintf( isoDate, "%04d-%02d-%02d %02d:%02d:%02d",
|
||||
local.tm_year+1900, local.tm_mon+1, local.tm_mday, local.tm_hour, local.tm_min, local.tm_sec);
|
||||
|
||||
loginDatabase.PExecute("INSERT INTO uptime (realmid, starttime, startstring, uptime) VALUES('%u', " I64FMTD ", '%s', 0)",
|
||||
loginDatabase.PExecute("INSERT INTO uptime (realmid, starttime, startstring, uptime) VALUES('%u', " UI64FMTD ", '%s', 0)",
|
||||
realmID, uint64(m_startTime), isoDate);
|
||||
|
||||
m_timers[WUPDATE_OBJECTS].SetInterval(0);
|
||||
|
|
@ -1542,7 +1542,7 @@ void World::Update(uint32 diff)
|
|||
uint32 maxClientsNum = GetMaxActiveSessionCount();
|
||||
|
||||
m_timers[WUPDATE_UPTIME].Reset();
|
||||
loginDatabase.PExecute("UPDATE uptime SET uptime = %u, maxplayers = %u WHERE realmid = %u AND starttime = " I64FMTD, tmpDiff, maxClientsNum, realmID, uint64(m_startTime));
|
||||
loginDatabase.PExecute("UPDATE uptime SET uptime = %u, maxplayers = %u WHERE realmid = %u AND starttime = " UI64FMTD, tmpDiff, maxClientsNum, realmID, uint64(m_startTime));
|
||||
}
|
||||
|
||||
/// <li> Handle all other objects
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue