summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermessage.cpp
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2010-04-06 17:30:23 -0400
committerLoren Shih <seraph@lindenlab.com>2010-04-06 17:30:23 -0400
commitc3d9316dff568d5265d856a708e3909deae09f18 (patch)
treec05e3fb3229f15b71b83483a52f52f00156ecbd3 /indra/newview/llviewermessage.cpp
parentcdbdb1168694bcbfc58208f2941f513b556a0d6e (diff)
EXT-6727 : Allow LLInventoryObservers to target a single item (instead of a vector of items)
Added new constructors to LLInventoryFetch types to allow passing in a single item.
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rw-r--r--indra/newview/llviewermessage.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 6f39de996e..35eb3390a5 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -703,9 +703,9 @@ static LLNotificationFunctorRegistration jgr_3("JoinGroupCanAfford", join_group_
class LLOpenAgentOffer : public LLInventoryFetchItemsObserver
{
public:
- LLOpenAgentOffer(const uuid_vec_t& ids,
+ LLOpenAgentOffer(const LLUUID& object_id,
const std::string& from_name) :
- LLInventoryFetchItemsObserver(ids),
+ LLInventoryFetchItemsObserver(object_id),
mFromName(from_name) {}
/*virtual*/ void done()
{
@@ -1207,9 +1207,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
// This is an offer from an agent. In this case, the back
// end has already copied the items into your inventory,
// so we can fetch it out of our inventory.
- uuid_vec_t items;
- items.push_back(mObjectID);
- LLOpenAgentOffer* open_agent_offer = new LLOpenAgentOffer(items, from_string);
+ LLOpenAgentOffer* open_agent_offer = new LLOpenAgentOffer(mObjectID, from_string);
open_agent_offer->startFetch();
if(catp || (itemp && itemp->isComplete()))
{
@@ -1605,9 +1603,7 @@ void inventory_offer_handler(LLOfferInfo* info)
p.name = "UserGiveItem";
// Prefetch the item into your local inventory.
- uuid_vec_t items;
- items.push_back(info->mObjectID);
- LLInventoryFetchItemsObserver* fetch_item = new LLInventoryFetchItemsObserver(items);
+ LLInventoryFetchItemsObserver* fetch_item = new LLInventoryFetchItemsObserver(info->mObjectID);
fetch_item->startFetch();
if(fetch_item->isEverythingComplete())
{
@@ -2124,9 +2120,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
if (is_muted)
{
// Prefetch the offered item so that it can be discarded by the appropriate observer. (EXT-4331)
- uuid_vec_t items;
- items.push_back(info->mObjectID);
- LLInventoryFetchItemsObserver* fetch_item = new LLInventoryFetchItemsObserver(items);
+ LLInventoryFetchItemsObserver* fetch_item = new LLInventoryFetchItemsObserver(info->mObjectID);
fetch_item->startFetch();
delete fetch_item;