diff options
author | Alexander Gavriliuk <alexandrgproductengine@lindenlab.com> | 2024-09-03 18:05:45 +0200 |
---|---|---|
committer | Guru <alexandrgproductengine@lindenlab.com> | 2024-09-08 00:11:56 +0200 |
commit | 2b7b81fbdbaaaa8698828af9529f9693692da2a2 (patch) | |
tree | a5c5fdfea2b228c347e3fe7b5c8e4fe2e854babf /indra/newview/llinventoryfunctions.cpp | |
parent | 2e886b7cfef14d087c2167e3384e9e19dcb3ff63 (diff) |
#459 Filters on object inventory
Diffstat (limited to 'indra/newview/llinventoryfunctions.cpp')
-rw-r--r-- | indra/newview/llinventoryfunctions.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 57c0d57190..dadd0590a9 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -2400,18 +2400,16 @@ void ungroup_folder_items(const LLUUID& folder_id) LLInventoryModel::cat_array_t cats = *cat_array; LLInventoryModel::item_array_t items = *item_array; - for (LLInventoryModel::cat_array_t::const_iterator cat_iter = cats.begin(); cat_iter != cats.end(); ++cat_iter) + for (const LLPointer<LLViewerInventoryCategory>& cat : cats) { - LLViewerInventoryCategory* cat = *cat_iter; if (cat) { gInventory.changeCategoryParent(cat, new_cat_uuid, false); } } - for (LLInventoryModel::item_array_t::const_iterator item_iter = items.begin(); item_iter != items.end(); ++item_iter) + for (const LLPointer<LLViewerInventoryItem>& item : items) { - LLViewerInventoryItem* item = *item_iter; - if(item) + if (item) { gInventory.changeItemParent(item, new_cat_uuid, false); } @@ -2424,8 +2422,7 @@ std::string get_searchable_description(LLInventoryModel* model, const LLUUID& it { if (model) { - const LLInventoryItem *item = model->getItem(item_id); - if(item) + if (const LLInventoryItem* item = model->getItem(item_id)) { std::string desc = item->getDescription(); LLStringUtil::toUpper(desc); @@ -2439,8 +2436,7 @@ std::string get_searchable_creator_name(LLInventoryModel* model, const LLUUID& i { if (model) { - const LLInventoryItem *item = model->getItem(item_id); - if(item) + if (const LLInventoryItem* item = model->getItem(item_id)) { LLAvatarName av_name; if (LLAvatarNameCache::get(item->getCreatorUUID(), &av_name)) |