summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorygallery.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2024-06-09 00:48:45 +0300
committerGitHub <noreply@github.com>2024-06-09 00:48:45 +0300
commit22d3ea34f29bc11f3e5bfe491f4bc0895e1d4653 (patch)
tree6c8e4f460f9d0ab2684e21a63f9ecd921eb45024 /indra/newview/llinventorygallery.cpp
parent69b48fd13adb129bfa56eaf81309e10eaa16a023 (diff)
parent395c1c6adf1ecb669f805d5244772b080c077cce (diff)
Merge pull request #1613 from Ansariel/DRTVWR-600-maint-A
Fix/re-enable MSVC compiler warnings
Diffstat (limited to 'indra/newview/llinventorygallery.cpp')
-rw-r--r--indra/newview/llinventorygallery.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/indra/newview/llinventorygallery.cpp b/indra/newview/llinventorygallery.cpp
index 8d3a795750..a72f669189 100644
--- a/indra/newview/llinventorygallery.cpp
+++ b/indra/newview/llinventorygallery.cpp
@@ -257,8 +257,8 @@ void LLInventoryGallery::updateRootFolder()
{
updateRemovedItem(mItems[i]->getUUID());
}
- S32 hidden_count = mHiddenItems.size();
- for (S32 i = hidden_count - 1; i >= 0; i--)
+ auto hidden_count = mHiddenItems.size();
+ for (size_t i = hidden_count - 1; i >= 0; i--)
{
updateRemovedItem(mHiddenItems[i]->getUUID());
}
@@ -343,7 +343,7 @@ void LLInventoryGallery::initGallery()
{
uuid_vec_t cats;
getCurrentCategories(cats);
- int n = cats.size();
+ int n = static_cast<int>(cats.size());
buildGalleryPanel(n);
mScrollPanel->addChild(mGalleryPanel);
for (int i = 0; i < n; i++)
@@ -619,8 +619,8 @@ void LLInventoryGallery::removeFromGalleryMiddle(LLInventoryGalleryItem* item)
removeFromGalleryLast(mItems[i]);
}
removeFromGalleryLast(mItems[n]);
- int saved_count = saved.size();
- for (int i = 0; i < saved_count; i++)
+ size_t saved_count = saved.size();
+ for (size_t i = 0; i < saved_count; i++)
{
addToGallery(saved.back());
saved.pop_back();
@@ -1882,13 +1882,10 @@ bool LLInventoryGallery::canPaste() const
}
// In normal mode, we need to check each element of the clipboard to know if we can paste or not
- std::vector<LLUUID> objects;
+ uuid_vec_t objects;
LLClipboard::instance().pasteFromClipboard(objects);
- S32 count = objects.size();
- for (S32 i = 0; i < count; i++)
+ for (const auto& item_id : objects)
{
- const LLUUID& item_id = objects.at(i);
-
// Each item must be copyable to be pastable
if (!isItemCopyable(item_id))
{