From 0f86f811c269b7c45baae2ac9bc72df70ba6b520 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Wed, 26 May 2010 14:47:48 -0700 Subject: DEV-50271 FIX SLURL support for non-clickable display names std::multimap::find does *not* return an iterator just to the matching results, use std::multimap::equal_range instead --- indra/llui/llurlentry.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'indra/llui/llurlentry.cpp') diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index 13fd20faf8..472c15a240 100644 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -160,8 +160,9 @@ void LLUrlEntryBase::callObservers(const std::string &id, const std::string &icon) { // notify all callbacks waiting on the given uuid - std::multimap::iterator it; - for (it = mObservers.find(id); it != mObservers.end();) + typedef std::multimap::iterator observer_it; + std::pair matching_range = mObservers.equal_range(id); + for (observer_it it = matching_range.first; it != matching_range.second;) { // call the callback - give it the new label LLUrlEntryObserver &observer = it->second; @@ -342,8 +343,9 @@ void LLUrlEntryAgent::callObservers(const std::string &id, const std::string &icon) { // notify all callbacks waiting on the given uuid - std::multimap::iterator it; - for (it = mObservers.find(id); it != mObservers.end();) + typedef std::multimap::iterator observer_it; + std::pair matching_range = mObservers.equal_range(id); + for (observer_it it = matching_range.first; it != matching_range.second;) { // call the callback - give it the new label LLUrlEntryObserver &observer = it->second; -- cgit v1.2.3