From 46fe5d49caef6c8db3df9d88f0d0ec773ef28095 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Fri, 26 Mar 2010 14:33:48 -0400 Subject: EXT-6536 : Make LLVOAvatarSelf a singleton Superficial cleanup so that all instances of gAgent.getAvatarObject() use "LLVOAvatarSelf *avatarp = gAgent.getAvatarObject". --- indra/newview/llinventorymodel.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'indra/newview/llinventorymodel.cpp') diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 83a466a243..1f9840923c 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -3774,7 +3774,7 @@ bool LLInventoryCollectFunctor::itemTransferCommonlyAllowed(LLInventoryItem* ite return false; bool allowed = false; - LLVOAvatarSelf* my_avatar = NULL; + LLVOAvatarSelf* avatarp = gAgent.getAvatarObject(); switch(item->getType()) { @@ -3783,8 +3783,7 @@ bool LLInventoryCollectFunctor::itemTransferCommonlyAllowed(LLInventoryItem* ite break; case LLAssetType::AT_OBJECT: - my_avatar = gAgent.getAvatarObject(); - if(my_avatar && !my_avatar->isWearingAttachment(item->getUUID())) + if(avatarp && !avatarp->isWearingAttachment(item->getUUID())) { allowed = true; } -- cgit v1.2.3