summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorybridge.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-05-12 19:39:30 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-05-12 19:39:30 +0100
commite2411ded41655d29af98f254aa5f322d0992bbad (patch)
tree445adef1eaa5e444711c32d46d30562f842b6e5f /indra/newview/llinventorybridge.cpp
parent379ca3c30830f6060637173147269dc0b2b58d27 (diff)
parent265391fb3f88a97c5af868f3712bb7b06ad630c1 (diff)
merge from viewer-public
Diffstat (limited to 'indra/newview/llinventorybridge.cpp')
-rw-r--r--indra/newview/llinventorybridge.cpp45
1 files changed, 17 insertions, 28 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 64379f4ce7..973257b19c 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -997,46 +997,36 @@ void LLInvFVBridge::purgeItem(LLInventoryModel *model, const LLUUID &uuid)
}
}
-bool LLInvFVBridge::isInOutfitsSidePanel() const
+BOOL LLInvFVBridge::isInOutfitsSidePanel() const
{
LLInventoryPanel *my_panel = dynamic_cast<LLInventoryPanel*>(mInventoryPanel.get());
LLPanelOutfitsInventory *outfit_panel =
dynamic_cast<LLPanelOutfitsInventory*>(LLSideTray::getInstance()->getPanel("panel_outfits_inventory"));
if (!outfit_panel)
- return false;
+ return FALSE;
return outfit_panel->isTabPanel(my_panel);
}
-bool LLInvFVBridge::canShare()
+BOOL LLInvFVBridge::canShare() const
{
const LLInventoryModel* model = getInventoryModel();
- if(!model)
- {
- return false;
- }
+ if (!model) return FALSE;
- LLViewerInventoryItem *item = model->getItem(mUUID);
+ const LLViewerInventoryItem *item = model->getItem(mUUID);
if (item)
{
- bool allowed = false;
- allowed = LLInventoryCollectFunctor::itemTransferCommonlyAllowed(item);
- if (allowed &&
- !item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID()))
- {
- allowed = false;
- }
- if (allowed &&
- !item->getPermissions().allowCopyBy(gAgent.getID()))
- {
- allowed = false;
- }
- return allowed;
+ if (!LLInventoryCollectFunctor::itemTransferCommonlyAllowed(item))
+ return FALSE;
+ if (!item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID()))
+ return FALSE;
+ if (!item->getPermissions().allowCopyBy(gAgent.getID()))
+ return FALSE;
+ return TRUE;
}
- LLViewerInventoryCategory* cat = model->getCategory(mUUID);
-
// All categories can be given.
- return cat != NULL;
+ const LLViewerInventoryCategory* cat = model->getCategory(mUUID);
+ return (cat != NULL);
}
// +=================================================+
@@ -4095,12 +4085,11 @@ LLObjectBridge::LLObjectBridge(LLInventoryPanel* inventory,
const LLUUID& uuid,
LLInventoryType::EType type,
U32 flags) :
- LLItemBridge(inventory, root, uuid),
- mInvType(type)
+ LLItemBridge(inventory, root, uuid)
{
mAttachPt = (flags & 0xff); // low bye of inventory flags
-
mIsMultiObject = ( flags & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS ) ? TRUE: FALSE;
+ mInvType = type;
}
LLUIImagePtr LLObjectBridge::getIcon() const
@@ -4447,9 +4436,9 @@ LLWearableBridge::LLWearableBridge(LLInventoryPanel* inventory,
LLWearableType::EType wearable_type) :
LLItemBridge(inventory, root, uuid),
mAssetType( asset_type ),
- mInvType(inv_type),
mWearableType(wearable_type)
{
+ mInvType = inv_type;
}
// *NOTE: hack to get from avatar inventory to avatar