From b42f9d836b4c0f7fbd4bdae1734021e2a09fdbe8 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sat, 1 Jun 2024 15:49:26 +0200 Subject: Re-enable a lot of compiler warnings for MSVC and address the C4267 "possible loss of precision" warnings --- indra/newview/llfavoritesbar.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/newview/llfavoritesbar.cpp') diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index 906d04691f..377710c170 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -1250,7 +1250,7 @@ void LLFavoritesBarCtrl::fitLabelWidth(LLMenuItemCallGL* menu_item) // Check whether item name wider than menu if (menu_item->getNominalWidth() > max_width) { - S32 chars_total = item_name.length(); + S32 chars_total = static_cast(item_name.length()); S32 chars_fitted = 1; menu_item->setLabel(LLStringExplicit("")); S32 label_space = max_width - menu_item->getFont()->getWidth("...") - @@ -1375,7 +1375,7 @@ bool LLFavoritesBarCtrl::handleRightMouseDown(S32 x, S32 y, MASK mask) } void copy_slurl_to_clipboard_cb(std::string& slurl) { - LLClipboard::instance().copyToClipboard(utf8str_to_wstring(slurl),0,slurl.size()); + LLClipboard::instance().copyToClipboard(utf8str_to_wstring(slurl), 0, static_cast(slurl.size())); LLSD args; args["SLURL"] = slurl; @@ -1522,8 +1522,8 @@ bool LLFavoritesBarCtrl::isClipboardPasteable() const std::vector objects; LLClipboard::instance().pasteFromClipboard(objects); - S32 count = objects.size(); - for(S32 i = 0; i < count; i++) + auto count = objects.size(); + for(size_t i = 0; i < count; i++) { const LLUUID &item_id = objects.at(i); @@ -1551,9 +1551,9 @@ void LLFavoritesBarCtrl::pasteFromClipboard() const LLInventoryItem* item = NULL; std::vector objects; LLClipboard::instance().pasteFromClipboard(objects); - S32 count = objects.size(); + auto count = objects.size(); LLUUID parent_id(mFavoriteFolderId); - for(S32 i = 0; i < count; i++) + for(size_t i = 0; i < count; i++) { item = model->getItem(objects.at(i)); if (item) -- cgit v1.2.3