diff options
author | Eric Tulla <tulla@lindenlab.com> | 2009-10-16 20:11:51 +0000 |
---|---|---|
committer | Eric Tulla <tulla@lindenlab.com> | 2009-10-16 20:11:51 +0000 |
commit | 850c0f1e33ed5188b5346a7aeb3099ca29e0d2d0 (patch) | |
tree | 107b7c906cc689987f43c61c90fc74cd2cfe6306 /indra/newview/llviewerinventory.cpp | |
parent | adaae9e082fb9200e2ea1c7cbc6e26cb5de35fa1 (diff) |
Merge of latest avatar pipeline working branch into viewer2.0 branch.
Result of: (NO CONFLICTS)
svn merge -r 135985:136503 svn+ssh://svn.lindenlab.com/svn/linden/branches/avatar-pipeline/currently-worn-folder-11 .
Diffstat (limited to 'indra/newview/llviewerinventory.cpp')
-rw-r--r-- | indra/newview/llviewerinventory.cpp | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index c34517d104..7e88320f49 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -612,9 +612,9 @@ void LLViewerInventoryCategory::determineFolderType() const LLViewerInventoryItem *item = (*item_iter); if (item->getIsLinkType()) return; - if (item->getInventoryType() == LLInventoryType::IT_WEARABLE) + if (item->isWearableType()) { - const EWearableType wearable_type = EWearableType(item->getFlags() & LLInventoryItem::II_FLAGS_WEARABLES_MASK); + const EWearableType wearable_type = item->getWearableType(); const std::string& wearable_name = LLWearableDictionary::getTypeName(wearable_type); U64 valid_folder_types = LLFolderType::lookupValidFolderTypes(wearable_name); folder_valid |= valid_folder_types; @@ -1278,6 +1278,22 @@ U32 LLViewerInventoryItem::getFlags() const return LLInventoryItem::getFlags(); } +bool LLViewerInventoryItem::isWearableType() const +{ + return (getInventoryType() == LLInventoryType::IT_WEARABLE); +} + +EWearableType LLViewerInventoryItem::getWearableType() const +{ + if (!isWearableType()) + { + llwarns << "item is not a wearable" << llendl; + return WT_INVALID; + } + return EWearableType(getFlags() & LLInventoryItem::II_FLAGS_WEARABLES_MASK); +} + + time_t LLViewerInventoryItem::getCreationDate() const { return LLInventoryItem::getCreationDate(); |