mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[9775] Cleanups in framework library.
* Removed last bits of threading in grid code. * Removed some weird and unneeded declarations. * General code style fixes. * (Perhaps some things I forgot.) Thanks to Lynx3d for the usual GCC-stabbing...
This commit is contained in:
parent
4d89b41f60
commit
7532061a79
25 changed files with 774 additions and 398 deletions
|
|
@ -71,28 +71,30 @@ void EventProcessor::KillAllEvents(bool force)
|
|||
|
||||
i_old->second->to_Abort = true;
|
||||
i_old->second->Abort(m_time);
|
||||
if(force || i_old->second->IsDeletable())
|
||||
if (force || i_old->second->IsDeletable())
|
||||
{
|
||||
delete i_old->second;
|
||||
|
||||
if(!force) // need per-element cleanup
|
||||
if (!force) // need per-element cleanup
|
||||
m_events.erase (i_old);
|
||||
}
|
||||
}
|
||||
|
||||
// fast clear event list (in force case)
|
||||
if(force)
|
||||
if (force)
|
||||
m_events.clear();
|
||||
}
|
||||
|
||||
void EventProcessor::AddEvent(BasicEvent* Event, uint64 e_time, bool set_addtime)
|
||||
{
|
||||
if (set_addtime) Event->m_addTime = m_time;
|
||||
if (set_addtime)
|
||||
Event->m_addTime = m_time;
|
||||
|
||||
Event->m_execTime = e_time;
|
||||
m_events.insert(std::pair<uint64, BasicEvent*>(e_time, Event));
|
||||
}
|
||||
|
||||
uint64 EventProcessor::CalculateTime(uint64 t_offset)
|
||||
{
|
||||
return(m_time + t_offset);
|
||||
return m_time + t_offset;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue