summaryrefslogtreecommitdiff
path: root/indra/newview/llpathfindinglinksetlist.cpp
diff options
context:
space:
mode:
authorTodd Stinson <stinson@lindenlab.com>2012-02-23 17:12:44 -0800
committerTodd Stinson <stinson@lindenlab.com>2012-02-23 17:12:44 -0800
commit05a49dd4252930fbfbb61a7e88ef5ef253cceca6 (patch)
tree47d61abc1f17d77cbd1b07281627a52808b677e4 /indra/newview/llpathfindinglinksetlist.cpp
parent73aa47f391341e6d6ef5136ef73302be689d3e9d (diff)
PATH-292: Fixing the post-modify update handler to update the linkset list rather than overwrite it.
Diffstat (limited to 'indra/newview/llpathfindinglinksetlist.cpp')
-rw-r--r--indra/newview/llpathfindinglinksetlist.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/indra/newview/llpathfindinglinksetlist.cpp b/indra/newview/llpathfindinglinksetlist.cpp
index e67b7b800c..7facf88c40 100644
--- a/indra/newview/llpathfindinglinksetlist.cpp
+++ b/indra/newview/llpathfindinglinksetlist.cpp
@@ -62,24 +62,23 @@ LLPathfindingLinksetList::~LLPathfindingLinksetList()
clear();
}
-void LLPathfindingLinksetList::update(const LLSD& pLinksetItems)
+void LLPathfindingLinksetList::update(const LLPathfindingLinksetList &pUpdateLinksetList)
{
- for (LLSD::map_const_iterator linksetItemIter = pLinksetItems.beginMap();
- linksetItemIter != pLinksetItems.endMap(); ++linksetItemIter)
+ for (LLPathfindingLinksetList::const_iterator updateLinksetIter = pUpdateLinksetList.begin();
+ updateLinksetIter != pUpdateLinksetList.end(); ++updateLinksetIter)
{
- const std::string& uuid(linksetItemIter->first);
- const LLSD& linksetData = linksetItemIter->second;
- LLPathfindingLinksetMap::iterator linksetIter = this->find(uuid);
+ const std::string &uuid = updateLinksetIter->first;
+ const LLPathfindingLinksetPtr updateLinksetPtr = updateLinksetIter->second;
+
+ LLPathfindingLinksetList::iterator linksetIter = find(uuid);
if (linksetIter == end())
{
- LLPathfindingLinksetPtr linkset(new LLPathfindingLinkset(uuid, linksetData));
- insert(std::pair<std::string, LLPathfindingLinksetPtr>(uuid, linkset));
+ insert(std::pair<std::string, LLPathfindingLinksetPtr>(uuid, updateLinksetPtr));
}
else
{
LLPathfindingLinksetPtr linksetPtr = linksetIter->second;
- const LLPathfindingLinkset newLinkset(uuid, linksetData);
- *linksetPtr = newLinkset;
+ *linksetPtr = *updateLinksetPtr;
}
}
}