diff options
author | Loren Shih <seraph@lindenlab.com> | 2010-05-13 17:24:54 -0400 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2010-05-13 17:24:54 -0400 |
commit | aebb49520b1919e0ac2bcc7373fc2db031e3b7f0 (patch) | |
tree | 1af8dfa79e015a1dfbb2c6af7b3f1d4c34bc949d | |
parent | 25711e6bce2baae1e6fd05948db11b2233cabf08 (diff) |
EXT-7305 : FIXED : Changed LLWearableDictionary to LLWearableType
Change enum naming to use WT_INVALID=255 instead of WT_NONE=255. Added WT_NONE as -1.
-rw-r--r-- | indra/newview/llappearancemgr.cpp | 6 | ||||
-rw-r--r-- | indra/newview/lltexlayerparams.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llviewerinventory.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llviewervisualparam.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llvoavatardefines.h | 2 | ||||
-rw-r--r-- | indra/newview/llvoavatarself.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llwearable.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llwearabletype.cpp | 13 | ||||
-rw-r--r-- | indra/newview/llwearabletype.h | 3 |
9 files changed, 19 insertions, 17 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 80e8b94ccc..bcaba34921 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -179,7 +179,7 @@ struct LLFoundData { LLFoundData() : mAssetType(LLAssetType::AT_NONE), - mWearableType(LLWearableType::WT_NONE), + mWearableType(LLWearableType::WT_INVALID), mWearable(NULL) {} LLFoundData(const LLUUID& item_id, @@ -392,7 +392,7 @@ public: linked_item->getAssetUUID(), linked_item->getName(), linked_item->getType(), - linked_item->isWearableType() ? linked_item->getWearableType() : LLWearableType::WT_NONE + linked_item->isWearableType() ? linked_item->getWearableType() : LLWearableType::WT_INVALID ); found.mWearable = mWearable; mHolder->mFoundList.push_front(found); @@ -1115,7 +1115,7 @@ void LLAppearanceMgr::updateAppearanceFromCOF() linked_item->getAssetUUID(), linked_item->getName(), linked_item->getType(), - linked_item->isWearableType() ? linked_item->getWearableType() : LLWearableType::WT_NONE + linked_item->isWearableType() ? linked_item->getWearableType() : LLWearableType::WT_INVALID ); #if 0 diff --git a/indra/newview/lltexlayerparams.cpp b/indra/newview/lltexlayerparams.cpp index 3c87f2386e..35acf883c7 100644 --- a/indra/newview/lltexlayerparams.cpp +++ b/indra/newview/lltexlayerparams.cpp @@ -235,7 +235,7 @@ BOOL LLTexLayerParamAlpha::getSkip() const } LLWearableType::EType type = (LLWearableType::EType)getWearableType(); - if ((type != LLWearableType::WT_NONE) && !avatar->isWearingWearableType(type)) + if ((type != LLWearableType::WT_INVALID) && !avatar->isWearingWearableType(type)) { return TRUE; } diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 1e7780bb26..49748c59e8 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -1545,7 +1545,7 @@ LLWearableType::EType LLViewerInventoryItem::getWearableType() const if (!isWearableType()) { llwarns << "item is not a wearable" << llendl; - return LLWearableType::WT_NONE; + return LLWearableType::WT_INVALID; } return LLWearableType::EType(getFlags() & LLInventoryItemFlags::II_FLAGS_WEARABLES_MASK); } diff --git a/indra/newview/llviewervisualparam.cpp b/indra/newview/llviewervisualparam.cpp index 61cf3b9b7a..422e530dc6 100644 --- a/indra/newview/llviewervisualparam.cpp +++ b/indra/newview/llviewervisualparam.cpp @@ -45,7 +45,7 @@ //----------------------------------------------------------------------------- LLViewerVisualParamInfo::LLViewerVisualParamInfo() : - mWearableType( LLWearableType::WT_NONE ), + mWearableType( LLWearableType::WT_INVALID ), mCrossWearable(FALSE), mCamDist( 0.5f ), mCamAngle( 0.f ), diff --git a/indra/newview/llvoavatardefines.h b/indra/newview/llvoavatardefines.h index cdf24dfdd9..9c4ee7e716 100644 --- a/indra/newview/llvoavatardefines.h +++ b/indra/newview/llvoavatardefines.h @@ -145,7 +145,7 @@ public: bool is_local_texture, EBakedTextureIndex baked_texture_index = BAKED_NUM_INDICES, const std::string& default_image_name = "", - LLWearableType::EType wearable_type = LLWearableType::WT_NONE); + LLWearableType::EType wearable_type = LLWearableType::WT_INVALID); const std::string mDefaultImageName; const LLWearableType::EType mWearableType; // It's either a local texture xor baked diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 322350d2d9..dec2e7efdf 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -183,7 +183,7 @@ void LLVOAvatarSelf::markDead() param; param = (LLViewerVisualParam*) getNextVisualParam()) { - if (param->getWearableType() != LLWearableType::WT_NONE) + if (param->getWearableType() != LLWearableType::WT_INVALID) { param->setIsDummy(TRUE); } diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp index 25ddf2c4bb..3ecd1296bd 100644 --- a/indra/newview/llwearable.cpp +++ b/indra/newview/llwearable.cpp @@ -88,7 +88,7 @@ static std::string asset_id_to_filename(const LLUUID &asset_id); LLWearable::LLWearable(const LLTransactionID& transaction_id) : mDefinitionVersion(LLWearable::sCurrentDefinitionVersion), - mType(LLWearableType::WT_NONE) + mType(LLWearableType::WT_INVALID) { mTransactionID = transaction_id; mAssetID = mTransactionID.makeAssetID(gAgent.getSecureSessionID()); @@ -96,7 +96,7 @@ LLWearable::LLWearable(const LLTransactionID& transaction_id) : LLWearable::LLWearable(const LLAssetID& asset_id) : mDefinitionVersion( LLWearable::sCurrentDefinitionVersion ), - mType(LLWearableType::WT_NONE) + mType(LLWearableType::WT_INVALID) { mAssetID = asset_id; mTransactionID.setNull(); diff --git a/indra/newview/llwearabletype.cpp b/indra/newview/llwearabletype.cpp index ee17d7ddea..c692df06ad 100644 --- a/indra/newview/llwearabletype.cpp +++ b/indra/newview/llwearabletype.cpp @@ -76,14 +76,15 @@ LLWearableDictionary::LLWearableDictionary() addEntry(LLWearableType::WT_PANTS, new WearableEntry("pants", "New Pants", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_PANTS)); addEntry(LLWearableType::WT_SHOES, new WearableEntry("shoes", "New Shoes", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_SHOES)); addEntry(LLWearableType::WT_SOCKS, new WearableEntry("socks", "New Socks", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_SOCKS)); - addEntry(LLWearableType::WT_JACKET, new WearableEntry("jacket", "New Jacket", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_JACKET)); - addEntry(LLWearableType::WT_GLOVES, new WearableEntry("gloves", "New Gloves", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_GLOVES)); - addEntry(LLWearableType::WT_UNDERSHIRT, new WearableEntry("undershirt", "New Undershirt", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_UNDERSHIRT)); - addEntry(LLWearableType::WT_UNDERPANTS, new WearableEntry("underpants", "New Underpants", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_UNDERPANTS)); + addEntry(LLWearableType::WT_JACKET, new WearableEntry("jacket", "New Jacket", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_JACKET)); + addEntry(LLWearableType::WT_GLOVES, new WearableEntry("gloves", "New Gloves", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_GLOVES)); + addEntry(LLWearableType::WT_UNDERSHIRT, new WearableEntry("undershirt", "New Undershirt", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_UNDERSHIRT)); + addEntry(LLWearableType::WT_UNDERPANTS, new WearableEntry("underpants", "New Underpants", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_UNDERPANTS)); addEntry(LLWearableType::WT_SKIRT, new WearableEntry("skirt", "New Skirt", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_SKIRT)); addEntry(LLWearableType::WT_ALPHA, new WearableEntry("alpha", "New Alpha", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_ALPHA)); - addEntry(LLWearableType::WT_TATTOO, new WearableEntry("tattoo", "New Tattoo", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_TATTOO)); - addEntry(LLWearableType::WT_NONE, new WearableEntry("invalid", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryIcon::ICONNAME_NONE)); + addEntry(LLWearableType::WT_TATTOO, new WearableEntry("tattoo", "New Tattoo", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_TATTOO)); + addEntry(LLWearableType::WT_INVALID, new WearableEntry("invalid", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryIcon::ICONNAME_NONE)); + addEntry(LLWearableType::WT_NONE, new WearableEntry("none", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryIcon::ICONNAME_NONE)); addEntry(LLWearableType::WT_COUNT, NULL); } diff --git a/indra/newview/llwearabletype.h b/indra/newview/llwearabletype.h index e6d955b6d5..8090fd8df7 100644 --- a/indra/newview/llwearabletype.h +++ b/indra/newview/llwearabletype.h @@ -59,7 +59,8 @@ public: WT_TATTOO = 14, WT_COUNT = 15, - WT_NONE = 255, + WT_INVALID = 255, + WT_NONE = -1, }; static const std::string& getTypeName(EType type); |