diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index b8edfd898a..6428eadc5e 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -2943,21 +2943,25 @@ void LLAppearanceMgr::removeCOFItemLinks(const LLUUID& item_id) LLInventoryModel::EXCLUDE_TRASH); for (S32 i=0; igetIsLinkType() && item->getLinkedUUID() == item_id) - { // [RLVa:KB] - Checked: 2013-02-12 (RLVa-1.4.8) #if LL_RELEASE_WITH_DEBUG_INFO || LL_DEBUG + const LLViewerInventoryItem* item = item_array.get(i).get(); + if (item->getIsLinkType() && item->getLinkedUUID() == item_id) + { // NOTE-RLVa: debug-only, can be removed down the line if (rlv_handler_t::isEnabled()) { RLV_ASSERT(rlvPredCanRemoveItem(item)); } -#endif // LL_RELEASE_WITH_DEBUG_INFO || LL_DEBUG -// [/RLVa:KB] - gInventory.purgeObject(item->getUUID()); } +#endif // LL_RELEASE_WITH_DEBUG_INFO || LL_DEBUG +// [/RLVa:KB] +// const LLInventoryItem* item = item_array.get(i).get(); +// if (item->getIsLinkType() && item->getLinkedUUID() == item_id) +// { +// gInventory.purgeObject(item->getUUID()); +// } } } diff --git a/indra/newview/rlvcommon.cpp b/indra/newview/rlvcommon.cpp index 7c3a772fc5..d382faba55 100644 --- a/indra/newview/rlvcommon.cpp +++ b/indra/newview/rlvcommon.cpp @@ -671,7 +671,7 @@ bool rlvPredCanNotWearItem(const LLViewerInventoryItem* pItem, ERlvWearMask eWea } // Checked: 2010-03-22 (RLVa-1.2.0c) | Added: RLVa-1.2.0a -bool rlvPredCanRemoveItem(const LLInventoryItem* pItem) +bool rlvPredCanRemoveItem(const LLViewerInventoryItem* pItem) { if ( (pItem) && (RlvForceWear::isWearableItem(pItem)) ) { @@ -694,7 +694,7 @@ bool rlvPredCanRemoveItem(const LLInventoryItem* pItem) } // Checked: 2010-03-22 (RLVa-1.2.0c) | Added: RLVa-1.2.0a -bool rlvPredCanNotRemoveItem(const LLInventoryItem* pItem) +bool rlvPredCanNotRemoveItem(const LLViewerInventoryItem* pItem) { return !rlvPredCanRemoveItem(pItem); } diff --git a/indra/newview/rlvcommon.h b/indra/newview/rlvcommon.h index 00afc2254e..b61f504fc9 100644 --- a/indra/newview/rlvcommon.h +++ b/indra/newview/rlvcommon.h @@ -236,8 +236,8 @@ protected: bool rlvPredCanWearItem(const LLViewerInventoryItem* pItem, ERlvWearMask eWearMask); bool rlvPredCanNotWearItem(const LLViewerInventoryItem* pItem, ERlvWearMask eWearMask); -bool rlvPredCanRemoveItem(const LLInventoryItem* pItem); -bool rlvPredCanNotRemoveItem(const LLInventoryItem* pItem); +bool rlvPredCanRemoveItem(const LLViewerInventoryItem* pItem); +bool rlvPredCanNotRemoveItem(const LLViewerInventoryItem* pItem); struct RlvPredCanWearItem { @@ -255,6 +255,18 @@ protected: ERlvWearMask m_eWearMask; }; +struct RlvPredCanRemoveItem +{ + RlvPredCanRemoveItem() {} + bool operator()(const LLViewerInventoryItem* pItem) { return rlvPredCanRemoveItem(pItem); } +}; + +struct RlvPredCanNotRemoveItem +{ + RlvPredCanNotRemoveItem() {} + bool operator()(const LLViewerInventoryItem* pItem) { return rlvPredCanNotRemoveItem(pItem); } +}; + struct RlvPredIsEqualOrLinkedItem { RlvPredIsEqualOrLinkedItem(const LLViewerInventoryItem* pItem) : m_pItem(pItem) {}