Fixes to compile with libc++

This commit is contained in:
Eduardo Bart
2013-02-05 18:30:16 -02:00
parent 717832b791
commit 86d06057ca
8 changed files with 9 additions and 121 deletions

View File

@@ -75,16 +75,6 @@ void EventDispatcher::poll()
}
m_pollEventsSize = m_eventList.size();
}
for(auto it = m_coroutines.begin(); it != m_coroutines.end();) {
stdext::coroutine& coroutine = (*it);
if(coroutine.is_finished())
it = m_coroutines.erase(it);
else {
coroutine.resume();
++it;
}
}
}
ScheduledEventPtr EventDispatcher::scheduleEvent(const std::function<void()>& callback, int delay)
@@ -125,7 +115,3 @@ EventPtr EventDispatcher::addEvent(const std::function<void()>& callback, bool p
return event;
}
void EventDispatcher::addCoroutine(const stdext::coroutine& coroutine)
{
m_coroutines.push_back(coroutine);
}

View File

@@ -27,7 +27,6 @@
#include "scheduledevent.h"
#include <queue>
#include <framework/stdext/coroutine.h>
// @bindsingleton g_dispatcher
class EventDispatcher
@@ -36,7 +35,6 @@ public:
void shutdown();
void poll();
void addCoroutine(const stdext::coroutine& coroutine);
EventPtr addEvent(const std::function<void()>& callback, bool pushFront = false);
ScheduledEventPtr scheduleEvent(const std::function<void()>& callback, int delay);
ScheduledEventPtr cycleEvent(const std::function<void()>& callback, int delay);
@@ -46,7 +44,6 @@ private:
int m_pollEventsSize;
stdext::boolean<false> m_disabled;
std::priority_queue<ScheduledEventPtr, std::vector<ScheduledEventPtr>, lessScheduledEvent> m_scheduledEventList;
std::list<stdext::coroutine> m_coroutines;
};
extern EventDispatcher g_dispatcher;