diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index add3cafaf7dcdc152756caf0998a94f3eb2e65c4..4c99bc2ca5e7c0a0012fe5470ac7d4b36991c48f 100644 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -3182,14 +3182,12 @@ void LLModelPreview::updateLodControls(S32 lod) "lod_triangle_limit_", "lod_error_threshold_" }; - const U32 num_lod_controls = sizeof(lod_controls)/sizeof(char*); const char* file_controls[] = { "lod_browse_", "lod_file_", }; - const U32 num_file_controls = sizeof(file_controls)/sizeof(char*); LLFloaterModelPreview* fmp = LLFloaterModelPreview::sInstance; if (!fmp) return; diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 0db9ad2006cb202dca5257862af2f22086921b97..c02c561ff47af07e2ad6f2894a8cc32d59bc5ff3 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -823,7 +823,7 @@ void LLFloaterPreference::reloadSkinList() skin_list->clearRows(); // User Downloaded Skins - for (const std::pair<std::string, skin_t>& skin : mUserSkins) + for (const auto& skin : mUserSkins) { LLSD row; row["id"] = skin.first; diff --git a/indra/newview/llfriendcard.cpp b/indra/newview/llfriendcard.cpp index 8e9e35b2c1ec1b7fc76695006e388e11667ddf53..03145584549bb4678eeb56d98d3020798627947a 100644 --- a/indra/newview/llfriendcard.cpp +++ b/indra/newview/llfriendcard.cpp @@ -599,7 +599,7 @@ void LLFriendCardsManager::onFriendListUpdate(U32 changed_mask) // Try to add cards into inventory. // If cards already exist they won't be created. const std::set<LLUUID>& changed_items = at.getChangedIDs(); - for (const auto card : changed_items) + for (const auto& card : changed_items) { cards_manager.addFriendCardToInventory(card); } @@ -620,7 +620,7 @@ void LLFriendCardsManager::onFriendListUpdate(U32 changed_mask) case LLFriendObserver::REMOVE: { const std::set<LLUUID>& changed_items = at.getChangedIDs(); - for (const auto card : changed_items) + for (const auto& card : changed_items) { LLFriendCardsManager::instance().removeFriendCardFromInventory(card); } diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp index dd15de6a9384bcbeb66644e6909ca30b8846ca05..ce0037c66870a2441bf6dbf10f69a9d463b44cc3 100644 --- a/indra/newview/llsidepaneliteminfo.cpp +++ b/indra/newview/llsidepaneliteminfo.cpp @@ -452,12 +452,12 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) // or ui elements don't apply to these objects and return from function if (!not_in_trash || cannot_restrict_permissions) { - for(const std::string item : perm_and_sale_items) + for(const std::string& item : perm_and_sale_items) { getChildView(item)->setVisible(false); } - for(const std::string item : debug_items) + for(const std::string& item : debug_items) { getChildView(item)->setVisible(false); } @@ -465,7 +465,7 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) } else // Make sure perms and sale ui elements are visible { - for(const std::string item : perm_and_sale_items) + for(const std::string& item : perm_and_sale_items) { getChildView(item)->setVisible(true); } diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index dc746114881a2fc28c0dbd14a03649fb7bfefab3..0ddb30c585e3cfe2c29fb25df8df332448ccdee7 100644 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -872,7 +872,7 @@ S32 LLTextureCache::update(F32 max_time_ms) lockWorkers(); - for (std::_Vector_iterator<std::_Vector_val<std::_Simple_types<unsigned int>>>::value_type handle : priorty_list) + for (auto handle : priorty_list) { handle_map_t::iterator iter2 = mWriters.find(handle); if(iter2 != mWriters.end()) @@ -1567,8 +1567,7 @@ void LLTextureCache::readHeaderCache() if (!purge_list.empty()) { - for (std::_Tree_const_iterator<std::_Tree_val<std::_Tree_simple_types<unsigned int>>>::value_type iter : - purge_list) + for (auto iter : purge_list) { std::string tex_filename = getTextureFileName(entries[iter].mID); removeEntry((S32)iter, entries[iter], tex_filename); diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp index 8e7c4c7730bde01b7cdfa2e1b8e92147afe64408..fa049ca2e9e7e5126bf67cbb452cd30a356da51f 100644 --- a/indra/newview/llviewertexteditor.cpp +++ b/indra/newview/llviewertexteditor.cpp @@ -455,9 +455,9 @@ void LLEmbeddedItems::removeUnusedChars() } } // Remove chars not actually used - for (std::_Tree_const_iterator<std::_Tree_val<std::_Tree_simple_types<unsigned int>>>::value_type iter : used) + for (auto val : used) { - removeEmbeddedItem(iter); + removeEmbeddedItem(val); } } @@ -468,8 +468,7 @@ void LLEmbeddedItems::copyUsedCharsToIndexed() // Copy all used llwchars to mEmbeddedIndexedChars mEmbeddedIndexedChars.clear(); - for (std::_Tree_const_iterator<std::_Tree_val<std::_Tree_simple_types<unsigned int>>>::value_type mEmbeddedUsedChar - : mEmbeddedUsedChars) + for (auto mEmbeddedUsedChar : mEmbeddedUsedChars) { mEmbeddedIndexedChars.push_back(mEmbeddedUsedChar); } @@ -478,8 +477,7 @@ void LLEmbeddedItems::copyUsedCharsToIndexed() S32 LLEmbeddedItems::getIndexFromEmbeddedChar(llwchar wch) { S32 idx = 0; - for (std::_Vector_iterator<std::_Vector_val<std::_Simple_types<unsigned int>>>::value_type& mEmbeddedIndexedChar : - mEmbeddedIndexedChars) + for (auto mEmbeddedIndexedChar : mEmbeddedIndexedChars) { if (wch == mEmbeddedIndexedChar) break; @@ -568,8 +566,7 @@ void LLEmbeddedItems::addItems(const std::vector<LLPointer<LLInventoryItem> >& i void LLEmbeddedItems::getEmbeddedItemList( std::vector<LLPointer<LLInventoryItem> >& items ) { - for (std::_Tree_const_iterator<std::_Tree_val<std::_Tree_simple_types<unsigned int>>>::value_type wc : - mEmbeddedUsedChars) + for (auto wc : mEmbeddedUsedChars) { LLPointer<LLInventoryItem> item = getEmbeddedItemPtr(wc); if (item) @@ -581,8 +578,7 @@ void LLEmbeddedItems::getEmbeddedItemList( std::vector<LLPointer<LLInventoryItem void LLEmbeddedItems::markSaved() { - for (std::_Tree_const_iterator<std::_Tree_val<std::_Tree_simple_types<unsigned int>>>::value_type wc : - mEmbeddedUsedChars) + for (auto wc : mEmbeddedUsedChars) { sEntries[wc].mSaved = TRUE; } @@ -953,7 +949,7 @@ void LLViewerTextEditor::setASCIIEmbeddedText(const std::string& instr) void LLViewerTextEditor::setEmbeddedText(const std::string& instr) { LLWString wtext = utf8str_to_wstring(instr); - for (unsigned int& i : wtext) + for (auto& i : wtext) { llwchar wch = i; if( wch >= FIRST_EMBEDDED_CHAR && wch <= LAST_EMBEDDED_CHAR ) diff --git a/indra/newview/llwlparammanager.cpp b/indra/newview/llwlparammanager.cpp index cd871dbbad4e0c290303f276a54488f1a98b68ca..b227ac658f4edc7e6aa124edb1993b209dd042ba 100644 --- a/indra/newview/llwlparammanager.cpp +++ b/indra/newview/llwlparammanager.cpp @@ -710,7 +710,7 @@ std::string LLWLParamManager::escapeString(const std::string& str) { static const char hex[] = "0123456789ABCDEF"; std::stringstream escaped_str; - for (std::_String_const_iterator<std::_String_val<std::_Simple_types<char>>>::value_type iter : str) + for (auto iter : str) { switch (iter) { case '0': case '1': case '2': case '3': case '4':