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
meow-7.2.2
Richard Nelson 2010-05-26 14:47:48 -07:00
parent f87f436fda
commit 0f86f811c2
1 changed files with 6 additions and 4 deletions

View File

@ -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<std::string, LLUrlEntryObserver>::iterator it;
for (it = mObservers.find(id); it != mObservers.end();)
typedef std::multimap<std::string, LLUrlEntryObserver>::iterator observer_it;
std::pair<observer_it, observer_it> 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<std::string, LLUrlEntryObserver>::iterator it;
for (it = mObservers.find(id); it != mObservers.end();)
typedef std::multimap<std::string, LLUrlEntryObserver>::iterator observer_it;
std::pair<observer_it, observer_it> 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;