diff options
author | Loren Shih <seraph@lindenlab.com> | 2010-05-12 13:46:21 -0400 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2010-05-12 13:46:21 -0400 |
commit | dbaaebfe5b2847a258019cd82a2abe044e3d3140 (patch) | |
tree | 8e18f997c0a5d1f9ecae88627bcac6c069a4d75a /indra/newview/llinventoryfunctions.cpp | |
parent | f1c775b7be55731475796b6b3b63eef1b2e290ef (diff) |
EXT-7319 : FIXED : INFRASTRUCTURE : LLInventoryBridge cleanup
Const correctness, logic cleanup, took out subclasses redefining same variable as base class (!!!).
Diffstat (limited to 'indra/newview/llinventoryfunctions.cpp')
-rw-r--r-- | indra/newview/llinventoryfunctions.cpp | 21 |
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) |