summaryrefslogtreecommitdiff
path: root/indra/newview/llinventoryfunctions.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-05-12 19:39:11 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-05-12 19:39:11 +0100
commit265391fb3f88a97c5af868f3712bb7b06ad630c1 (patch)
tree39393f9a6a1a3107f1bf9bc5bb8bc68d7a9fee9f /indra/newview/llinventoryfunctions.cpp
parentb54e4459df25ac00a63a6d2f094372ce74a11069 (diff)
parent491d0f1ae4b3557f36a9c1ba7d0033fdcb7d22e5 (diff)
merge
Diffstat (limited to 'indra/newview/llinventoryfunctions.cpp')
-rw-r--r--indra/newview/llinventoryfunctions.cpp21
1 files changed, 6 insertions, 15 deletions
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index 35ad8b64da..f1520d34df 100644
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -92,39 +92,30 @@ LLUUID LLInventoryState::sWearNewClothingTransactionID;
///----------------------------------------------------------------------------
// static
-bool LLInventoryCollectFunctor::itemTransferCommonlyAllowed(LLInventoryItem* item)
+bool LLInventoryCollectFunctor::itemTransferCommonlyAllowed(const LLInventoryItem* item)
{
if (!item)
return false;
- bool allowed = false;
-
switch(item->getType())
{
case LLAssetType::AT_CALLINGCARD:
- // not allowed
+ return false;
break;
-
case LLAssetType::AT_OBJECT:
if (isAgentAvatarValid() && !gAgentAvatarp->isWearingAttachment(item->getUUID()))
- {
- allowed = true;
- }
+ return true;
break;
-
case LLAssetType::AT_BODYPART:
case LLAssetType::AT_CLOTHING:
if(!gAgentWearables.isWearingItem(item->getUUID()))
- {
- allowed = true;
- }
+ return true;
break;
default:
- allowed = true;
+ return true;
break;
}
-
- return allowed;
+ return false;
}
bool LLIsType::operator()(LLInventoryCategory* cat, LLInventoryItem* item)