summaryrefslogtreecommitdiff
path: root/indra/newview/llavatarlist.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-04-27 17:51:37 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-04-27 17:51:37 +0100
commitec935189b62b77e5e544b575531d69b6916f4cc5 (patch)
treea31e18cf83dcbc6c79ae7b1049cfa04a7270ab6c /indra/newview/llavatarlist.cpp
parentc05cfcae3f8b2f3b8aca7584b2872ee11aeea921 (diff)
parent42aa72cd99b68698861c8bcbb555d2c2cf136f9d (diff)
merge from viewer-trunk
Diffstat (limited to 'indra/newview/llavatarlist.cpp')
-rw-r--r--indra/newview/llavatarlist.cpp18
1 files changed, 2 insertions, 16 deletions
diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp
index 8ba47b5198..fd0b20281b 100644
--- a/indra/newview/llavatarlist.cpp
+++ b/indra/newview/llavatarlist.cpp
@@ -34,6 +34,7 @@
// common
#include "lltrans.h"
+#include "llcommonutils.h"
#include "llavatarlist.h"
#include "llagentdata.h" // for comparator
@@ -404,7 +405,6 @@ void LLAvatarList::computeDifference(
uuid_vec_t& vremoved)
{
uuid_vec_t vcur;
- uuid_vec_t vnew = vnew_unsorted;
// Convert LLSDs to LLUUIDs.
{
@@ -415,21 +415,7 @@ void LLAvatarList::computeDifference(
vcur.push_back(vcur_values[i].asUUID());
}
- std::sort(vcur.begin(), vcur.end());
- std::sort(vnew.begin(), vnew.end());
-
- uuid_vec_t::iterator it;
- size_t maxsize = llmax(vcur.size(), vnew.size());
- vadded.resize(maxsize);
- vremoved.resize(maxsize);
-
- // what to remove
- it = set_difference(vcur.begin(), vcur.end(), vnew.begin(), vnew.end(), vremoved.begin());
- vremoved.erase(it, vremoved.end());
-
- // what to add
- it = set_difference(vnew.begin(), vnew.end(), vcur.begin(), vcur.end(), vadded.begin());
- vadded.erase(it, vadded.end());
+ LLCommonUtils::computeDifference(vnew_unsorted, vcur, vadded, vremoved);
}
// Refresh shown time of our last interaction with all listed avatars.