diff options
author | Aaron Brashears <aaronb@lindenlab.com> | 2007-02-09 23:35:12 +0000 |
---|---|---|
committer | Aaron Brashears <aaronb@lindenlab.com> | 2007-02-09 23:35:12 +0000 |
commit | 5cc44523f79b6cf495d2649fce9bf9e5181787e8 (patch) | |
tree | af7409521b24318b7c48a7434824178888c17a3e /indra/llcommon/llevent.cpp | |
parent | 0009346667872b90d39089c3800ab3e00ce73b51 (diff) |
Result of svn merge -r57350:57790 svn+ssh://svn/svn/linden/branches/os-patches.001 into release.
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); |