From b95d780b2ec38078100a96ed3b5760c29598a0db Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Mon, 15 Jun 2020 16:07:05 +0300 Subject: SL-13457 FIXED Crash in LLFolderViewGroupedItemBridge::canWearSelected --- indra/newview/llinventorybridge.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 657c65c68d..b1de884f06 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -7655,8 +7655,7 @@ bool LLFolderViewGroupedItemBridge::canWearSelected(uuid_vec_t item_ids) for (uuid_vec_t::const_iterator it = item_ids.begin(); it != item_ids.end(); ++it) { LLViewerInventoryItem* item = gInventory.getItem(*it); - LLAssetType::EType asset_type = item->getType(); - if (!item || (asset_type >= LLAssetType::AT_COUNT) || (asset_type <= LLAssetType::AT_NONE)) + if (!item || (item->getType() >= LLAssetType::AT_COUNT) || (item->getType() <= LLAssetType::AT_NONE)) { return false; } -- cgit v1.2.3 From 1edd38e742b571064c4acece8f29daf25a5e69bb Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 12 Oct 2020 18:35:34 +0300 Subject: SL-14078 Maked couple functions as const --- indra/newview/llinventorybridge.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 3802527ead..7f2c7c6103 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -7644,11 +7644,11 @@ void LLFolderViewGroupedItemBridge::groupFilterContextMenu(folder_view_item_dequ disable_context_entries_if_present(menu, disabled_items); } -bool LLFolderViewGroupedItemBridge::canWearSelected(uuid_vec_t item_ids) +bool LLFolderViewGroupedItemBridge::canWearSelected(const uuid_vec_t item_ids) const { for (uuid_vec_t::const_iterator it = item_ids.begin(); it != item_ids.end(); ++it) { - LLViewerInventoryItem* item = gInventory.getItem(*it); + const LLViewerInventoryItem* item = gInventory.getItem(*it); if (!item || (item->getType() >= LLAssetType::AT_COUNT) || (item->getType() <= LLAssetType::AT_NONE)) { return false; -- cgit v1.2.3 From 131996176f647e710bf4625cc2f93a631be9bcb2 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 12 Oct 2020 22:52:45 +0300 Subject: SL-14078 Small optimization --- indra/newview/llinventorybridge.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 7f2c7c6103..18fbbb8650 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -7644,7 +7644,7 @@ void LLFolderViewGroupedItemBridge::groupFilterContextMenu(folder_view_item_dequ disable_context_entries_if_present(menu, disabled_items); } -bool LLFolderViewGroupedItemBridge::canWearSelected(const uuid_vec_t item_ids) const +bool LLFolderViewGroupedItemBridge::canWearSelected(const uuid_vec_t& item_ids) const { for (uuid_vec_t::const_iterator it = item_ids.begin(); it != item_ids.end(); ++it) { -- cgit v1.2.3