diff options
Diffstat (limited to 'indra/llcommon/llevent.cpp')
-rw-r--r-- | indra/llcommon/llevent.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/indra/llcommon/llevent.cpp b/indra/llcommon/llevent.cpp index 6e6fce6ec3..368159ee54 100644 --- a/indra/llcommon/llevent.cpp +++ b/indra/llcommon/llevent.cpp @@ -167,16 +167,14 @@ void LLSimpleDispatcher::addListener(LLEventListener* listener, LLSD filter, con void LLSimpleDispatcher::removeListener(LLEventListener* listener) { - std::vector<LLListenerEntry>::iterator itor; - for (itor=mListeners.begin(); itor!=mListeners.end();) + std::vector<LLListenerEntry>::iterator itor = mListeners.begin(); + std::vector<LLListenerEntry>::iterator end = mListeners.end(); + for (; itor != end; ++itor) { if ((*itor).listener == listener) { mListeners.erase(itor); - } - else - { - ++itor; + break; } } listener->handleDetach(mParent); |