Exemple #1
0
inline void MoveEvents::clearMap(MoveListMap& map)
{
    for(MoveListMap::iterator it = map.begin(); it != map.end(); ++it)
    {
        for(int32_t i = MOVE_EVENT_FIRST; i <= MOVE_EVENT_LAST; ++i)
        {
            EventList& moveEventList = it->second.moveEvent[i];
            for(EventList::iterator it = moveEventList.begin(); it != moveEventList.end(); ++it)
                delete (*it);

            moveEventList.clear();
        }
    }

    map.clear();
}