summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerinventory.cpp
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2010-05-11 15:08:29 -0400
committerLoren Shih <seraph@lindenlab.com>2010-05-11 15:08:29 -0400
commitadc0aba2dd206e76a41298727794ab80754d439b (patch)
tree70b1b2d37ad21ec074ab939ef0fb4dd8e7b23ae6 /indra/newview/llviewerinventory.cpp
parent5490d4f56688597dfcd6077bc7e0f5f0c9053ae4 (diff)
EXT-7305 : FIXED : Changed LLWearableDictionary to LLWearableType
Refactored LLWearableDictionary to look more like LLAssetType/LLFolderType/etc. in terms of code design. This required a lot of superficial changes across many files. Overall functionality has not changed.
Diffstat (limited to 'indra/newview/llviewerinventory.cpp')
-rw-r--r--indra/newview/llviewerinventory.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index ed3d6a0464..ac10b09a37 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -724,8 +724,8 @@ void LLViewerInventoryCategory::determineFolderType()
return;
if (item->isWearableType())
{
- const EWearableType wearable_type = item->getWearableType();
- const std::string& wearable_name = LLWearableDictionary::getTypeName(wearable_type);
+ const LLWearableType::EType wearable_type = item->getWearableType();
+ const std::string& wearable_name = LLWearableType::getTypeName(wearable_type);
U64 valid_folder_types = LLViewerFolderType::lookupValidFolderTypes(wearable_name);
folder_valid |= valid_folder_types;
folder_invalid |= ~valid_folder_types;
@@ -909,7 +909,7 @@ void create_inventory_item(const LLUUID& agent_id, const LLUUID& session_id,
const LLUUID& parent, const LLTransactionID& transaction_id,
const std::string& name,
const std::string& desc, LLAssetType::EType asset_type,
- LLInventoryType::EType inv_type, EWearableType wtype,
+ LLInventoryType::EType inv_type, LLWearableType::EType wtype,
U32 next_owner_perm,
LLPointer<LLInventoryCallback> cb)
{
@@ -1196,10 +1196,10 @@ void menu_create_inventory_item(LLFolderView* root, LLFolderBridge *bridge, cons
else
{
// Use for all clothing and body parts. Adding new wearable types requires updating LLWearableDictionary.
- EWearableType wearable_type = LLWearableDictionary::typeNameToType(type_name);
- if (wearable_type >= WT_SHAPE && wearable_type < WT_COUNT)
+ LLWearableType::EType wearable_type = LLWearableType::typeNameToType(type_name);
+ if (wearable_type >= LLWearableType::WT_SHAPE && wearable_type < LLWearableType::WT_COUNT)
{
- LLAssetType::EType asset_type = LLWearableDictionary::getAssetType(wearable_type);
+ LLAssetType::EType asset_type = LLWearableType::getAssetType(wearable_type);
LLFolderType::EType folder_type = LLFolderType::assetTypeToFolderType(asset_type);
const LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(folder_type);
LLFolderBridge::createWearable(parent_id, wearable_type);
@@ -1537,14 +1537,14 @@ bool LLViewerInventoryItem::isWearableType() const
return (getInventoryType() == LLInventoryType::IT_WEARABLE);
}
-EWearableType LLViewerInventoryItem::getWearableType() const
+LLWearableType::EType LLViewerInventoryItem::getWearableType() const
{
if (!isWearableType())
{
llwarns << "item is not a wearable" << llendl;
- return WT_INVALID;
+ return LLWearableType::WT_NONE;
}
- return EWearableType(getFlags() & LLInventoryItemFlags::II_FLAGS_WEARABLES_MASK);
+ return LLWearableType::EType(getFlags() & LLInventoryItemFlags::II_FLAGS_WEARABLES_MASK);
}