diff options
author | Mark Palange (Mani) <palange@lindenlab.com> | 2010-12-02 11:40:54 -0800 |
---|---|---|
committer | Mark Palange (Mani) <palange@lindenlab.com> | 2010-12-02 11:40:54 -0800 |
commit | 039c0466f9759d7b966d8faf60945b3924d017a8 (patch) | |
tree | a0c754da1b223f765ec5b5b27f754a731d365e01 /indra/newview/llremoteparcelrequest.cpp | |
parent | c51608633ddfdcf9a053fff37461059398ed4500 (diff) |
CHOP-240 Fix for incorrect use of std:multimap iterators. Rev. by Alain.
Diffstat (limited to 'indra/newview/llremoteparcelrequest.cpp')
-rw-r--r-- | indra/newview/llremoteparcelrequest.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/indra/newview/llremoteparcelrequest.cpp b/indra/newview/llremoteparcelrequest.cpp index 10d4452ed2..0dff087553 100644 --- a/indra/newview/llremoteparcelrequest.cpp +++ b/indra/newview/llremoteparcelrequest.cpp @@ -78,10 +78,11 @@ void LLRemoteParcelRequestResponder::error(U32 status, const std::string& reason void LLRemoteParcelInfoProcessor::addObserver(const LLUUID& parcel_id, LLRemoteParcelInfoObserver* observer) { observer_multimap_t::iterator it; + observer_multimap_t::iterator start = mObservers.lower_bound(parcel_id); observer_multimap_t::iterator end = mObservers.upper_bound(parcel_id); // Check if the observer is already in observers list for this UUID - for(it = mObservers.find(parcel_id); it != end; ++it) + for(it = start; it != end; ++it) { if (it->second.get() == observer) { @@ -100,9 +101,10 @@ void LLRemoteParcelInfoProcessor::removeObserver(const LLUUID& parcel_id, LLRemo } observer_multimap_t::iterator it; + observer_multimap_t::iterator start = mObservers.lower_bound(parcel_id); observer_multimap_t::iterator end = mObservers.upper_bound(parcel_id); - for(it = mObservers.find(parcel_id); it != end; ++it) + for(it = start; it != end; ++it) { if (it->second.get() == observer) { @@ -139,9 +141,10 @@ void LLRemoteParcelInfoProcessor::processParcelInfoReply(LLMessageSystem* msg, v deadlist_t dead_iters; observer_multimap_t::iterator oi; + observer_multimap_t::iterator start = observers.lower_bound(parcel_data.parcel_id); observer_multimap_t::iterator end = observers.upper_bound(parcel_data.parcel_id); - for (oi = observers.find(parcel_data.parcel_id); oi != end; ++oi) + for (oi = start; oi != end; ++oi) { LLRemoteParcelInfoObserver * observer = oi->second.get(); if(observer) |