diff options
author | Matthew Hoops | 2011-08-07 20:11:27 -0400 |
---|---|---|
committer | Matthew Hoops | 2011-08-07 20:11:27 -0400 |
commit | c05c42ecc60c8f928628787272743f169a0d5903 (patch) | |
tree | f2b06be630676b7302a1fb62940099b2ec71442d /common/EventDispatcher.cpp | |
parent | e43a6671fc04f2c67b8efa2c0fdfdd6ec0ea1023 (diff) | |
parent | 45dc303159d5bbe77a351df31e6f2d2f97a3412d (diff) | |
download | scummvm-rg350-c05c42ecc60c8f928628787272743f169a0d5903.tar.gz scummvm-rg350-c05c42ecc60c8f928628787272743f169a0d5903.tar.bz2 scummvm-rg350-c05c42ecc60c8f928628787272743f169a0d5903.zip |
Merge remote branch 'upstream/master' into soccer
Diffstat (limited to 'common/EventDispatcher.cpp')
-rw-r--r-- | common/EventDispatcher.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/common/EventDispatcher.cpp b/common/EventDispatcher.cpp index e97068c0d0..ce1ef0c1c8 100644 --- a/common/EventDispatcher.cpp +++ b/common/EventDispatcher.cpp @@ -28,12 +28,12 @@ EventDispatcher::EventDispatcher() : _mapper(0) { } EventDispatcher::~EventDispatcher() { - for (Common::List<SourceEntry>::iterator i = _sources.begin(); i != _sources.end(); ++i) { + for (List<SourceEntry>::iterator i = _sources.begin(); i != _sources.end(); ++i) { if (i->autoFree) delete i->source; } - for (Common::List<ObserverEntry>::iterator i = _observers.begin(); i != _observers.end(); ++i) { + for (List<ObserverEntry>::iterator i = _observers.begin(); i != _observers.end(); ++i) { if (i->autoFree) delete i->observer; } @@ -43,9 +43,9 @@ EventDispatcher::~EventDispatcher() { } void EventDispatcher::dispatch() { - Common::Event event; + Event event; - for (Common::List<SourceEntry>::iterator i = _sources.begin(); i != _sources.end(); ++i) { + for (List<SourceEntry>::iterator i = _sources.begin(); i != _sources.end(); ++i) { const bool allowMapping = i->source->allowMapping(); while (i->source->pollEvent(event)) { @@ -83,7 +83,7 @@ void EventDispatcher::registerSource(EventSource *source, bool autoFree) { } void EventDispatcher::unregisterSource(EventSource *source) { - for (Common::List<SourceEntry>::iterator i = _sources.begin(); i != _sources.end(); ++i) { + for (List<SourceEntry>::iterator i = _sources.begin(); i != _sources.end(); ++i) { if (i->source == source) { if (i->autoFree) delete source; @@ -101,7 +101,7 @@ void EventDispatcher::registerObserver(EventObserver *obs, uint priority, bool a newEntry.priority = priority; newEntry.autoFree = autoFree; - for (Common::List<ObserverEntry>::iterator i = _observers.begin(); i != _observers.end(); ++i) { + for (List<ObserverEntry>::iterator i = _observers.begin(); i != _observers.end(); ++i) { if (i->priority < priority) { _observers.insert(i, newEntry); return; @@ -112,7 +112,7 @@ void EventDispatcher::registerObserver(EventObserver *obs, uint priority, bool a } void EventDispatcher::unregisterObserver(EventObserver *obs) { - for (Common::List<ObserverEntry>::iterator i = _observers.begin(); i != _observers.end(); ++i) { + for (List<ObserverEntry>::iterator i = _observers.begin(); i != _observers.end(); ++i) { if (i->observer == obs) { if (i->autoFree) delete obs; @@ -124,11 +124,10 @@ void EventDispatcher::unregisterObserver(EventObserver *obs) { } void EventDispatcher::dispatchEvent(const Event &event) { - for (Common::List<ObserverEntry>::iterator i = _observers.begin(); i != _observers.end(); ++i) { + for (List<ObserverEntry>::iterator i = _observers.begin(); i != _observers.end(); ++i) { if (i->observer->notifyEvent(event)) break; } } } // End of namespace Common - |