summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermessage.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2013-11-01 11:02:51 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2013-11-01 11:02:51 -0400
commite26268add0d10cb7609afd9070f00d0331b78c4e (patch)
treed442909903109b8389113ffbdb6511d43c92ea52 /indra/newview/llviewermessage.cpp
parent914ae700d211923c80df7de9a072b5692f164515 (diff)
SH-4595 WIP - reworked descendents of LLInventoryAddedObserver to use gInventory.getAddedIDs(). LLInventoryAddedObserver isn't really needed anymore, but leaving it in as a debugging point at least for now.
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rwxr-xr-xindra/newview/llviewermessage.cpp20
1 files changed, 14 insertions, 6 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 167c33f3ff..64cbc82578 100755
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -1001,7 +1001,12 @@ class LLOpenTaskOffer : public LLInventoryAddedObserver
protected:
/*virtual*/ void done()
{
- for (uuid_vec_t::iterator it = mAdded.begin(); it != mAdded.end();)
+ uuid_vec_t added;
+ for(uuid_set_t::const_iterator it = gInventory.getAddedIDs().begin(); it != gInventory.getAddedIDs().end(); ++it)
+ {
+ added.push_back(*it);
+ }
+ for (uuid_vec_t::iterator it = added.begin(); it != added.end();)
{
const LLUUID& item_uuid = *it;
bool was_moved = false;
@@ -1023,13 +1028,12 @@ protected:
if (was_moved)
{
- it = mAdded.erase(it);
+ it = added.erase(it);
}
else ++it;
}
- open_inventory_offer(mAdded, "");
- mAdded.clear();
+ open_inventory_offer(added, "");
}
};
@@ -1038,8 +1042,12 @@ class LLOpenTaskGroupOffer : public LLInventoryAddedObserver
protected:
/*virtual*/ void done()
{
- open_inventory_offer(mAdded, "group_offer");
- mAdded.clear();
+ uuid_vec_t added;
+ for(uuid_set_t::const_iterator it = gInventory.getAddedIDs().begin(); it != gInventory.getAddedIDs().end(); ++it)
+ {
+ added.push_back(*it);
+ }
+ open_inventory_offer(added, "group_offer");
gInventory.removeObserver(this);
delete this;
}