diff --git a/indra/llcharacter/llbvhloader.cpp b/indra/llcharacter/llbvhloader.cpp index 902adb4b11742f8fc780273b33d81eb767a212cb..dd99a734cec0f5ec153d52242cc23a8f304c6810 100644 --- a/indra/llcharacter/llbvhloader.cpp +++ b/indra/llcharacter/llbvhloader.cpp @@ -505,8 +505,8 @@ ELoadStatus LLBVHLoader::loadAliases(const char * filename) { if ( LLSDSerialize::fromXML(aliases_sd, input_stream) ) { - for(LLSD::map_iterator alias_iter = aliases_sd.beginMap(); - alias_iter != aliases_sd.endMap(); + for(LLSD::map_iterator alias_iter = aliases_sd.beginMap(), alias_end = aliases_sd.endMap(); + alias_iter != alias_end; ++alias_iter) { LLSD::String alias_name = alias_iter->first; diff --git a/indra/llcommon/llmetricperformancetester.cpp b/indra/llcommon/llmetricperformancetester.cpp index 28ffac2d995487e4f45d1d9905ea6be55bcbc5c2..3a708ae039657afa961a231199b4a4b8c4092be2 100644 --- a/indra/llcommon/llmetricperformancetester.cpp +++ b/indra/llcommon/llmetricperformancetester.cpp @@ -103,7 +103,7 @@ LLSD LLMetricPerformanceTesterBasic::analyzeMetricPerformanceLog(std::istream& i while (!is.fail() && !is.eof() && LLSDParser::PARSE_FAILURE != LLSDSerialize::fromXML(cur, is)) { - for (auto iter = cur.beginMap(); iter != cur.endMap(); ++iter) + for (auto iter = cur.beginMap(), end = cur.endMap(); iter != end; ++iter) { std::string label = iter->first; diff --git a/indra/llcommon/llmetrics.cpp b/indra/llcommon/llmetrics.cpp index 797180f3538c86529d676426549665390b53f44e..81a343da141eac79ae6ead97e28dd4e679a3694e 100644 --- a/indra/llcommon/llmetrics.cpp +++ b/indra/llcommon/llmetrics.cpp @@ -105,9 +105,8 @@ void LLMetricsImpl::printTotals(LLSD metadata) const std::string& location = (*loc_it).first; const LLSD& loc_map = (*loc_it).second; - auto mesg_it = loc_map.beginMap(); - auto mesg_end = loc_map.endMap(); - for ( ; mesg_it != mesg_end; ++mesg_it) + for (auto mesg_it = loc_map.beginMap(), + mesg_end = loc_map.endMap(); mesg_it != mesg_end; ++mesg_it) { const std::string& mesg = (*mesg_it).first; const LLSD& mesg_map = (*mesg_it).second; diff --git a/indra/llcommon/llprocessor.cpp b/indra/llcommon/llprocessor.cpp index a21056ca367cbd98e60d14071b0ab1b35c927322..f8b82af49d3cdd4ddf533343dadde3ef79d3dd84 100644 --- a/indra/llcommon/llprocessor.cpp +++ b/indra/llcommon/llprocessor.cpp @@ -276,8 +276,8 @@ public: out << "//////////////////////////" << std::endl; // Iterate through the dictionary of configuration options. - LLSD configs = mProcessorInfo["config"]; - for(LLSD::map_const_iterator cfgItr = configs.beginMap(); cfgItr != configs.endMap(); ++cfgItr) + const LLSD& configs = mProcessorInfo["config"]; + for(LLSD::map_const_iterator cfgItr = configs.beginMap(), cfgEnd = configs.endMap(); cfgItr != cfgEnd; ++cfgItr) { out << cfgItr->first << " = " << cfgItr->second << std::endl; } @@ -286,7 +286,8 @@ public: out << "// CPU Extensions" << std::endl; out << "//////////////////////////" << std::endl; - for(auto itr = mProcessorInfo["extension"].beginMap(); itr != mProcessorInfo["extension"].endMap(); ++itr) + const LLSD& extensions = mProcessorInfo["extension"]; + for(auto itr = extensions.beginMap(), end = extensions.endMap(); itr != end; ++itr) { out << " " << itr->first << std::endl; } diff --git a/indra/llcommon/llsdjson.cpp b/indra/llcommon/llsdjson.cpp index dc105355622fc7011db0548d79a38959f3179e0c..d2d28fb4dcebfe1f7fd0e4ef8a459d538fa9e1cd 100644 --- a/indra/llcommon/llsdjson.cpp +++ b/indra/llcommon/llsdjson.cpp @@ -103,7 +103,7 @@ nlohmann::json LlsdToJson(const LLSD &val) result = val.asString(); break; case LLSD::TypeMap: - for (auto it = val.beginMap(); it != val.endMap(); ++it) + for (auto it = val.beginMap(), it_end = val.endMap(); it != it_end; ++it) { result[it->first] = LlsdToJson(it->second); } diff --git a/indra/llcommon/llsdparam.cpp b/indra/llcommon/llsdparam.cpp index decff2f1210c2c71161a14e209f1a9ed00d103e9..78bf050f94367e473cb87e5c115bfd3fc762ffbd 100644 --- a/indra/llcommon/llsdparam.cpp +++ b/indra/llcommon/llsdparam.cpp @@ -256,8 +256,8 @@ void LLParamSDParserUtilities::readSDValues(read_sd_cb_t cb, const LLSD& sd, LLI { if (sd.isMap()) { - for (auto it = sd.beginMap(); - it != sd.endMap(); + for (auto it = sd.beginMap(), it_end = sd.endMap(); + it != it_end; ++it) { stack.push_back(make_pair(it->first, true)); diff --git a/indra/llcommon/llsdserialize.cpp b/indra/llcommon/llsdserialize.cpp index 38e392ff6c97f84f47b864e13a29f96ff62a056f..9631315f301a224f3340c12a74fd4f8777e2b1c6 100644 --- a/indra/llcommon/llsdserialize.cpp +++ b/indra/llcommon/llsdserialize.cpp @@ -1298,9 +1298,8 @@ S32 LLSDNotationFormatter::format_impl(const LLSD& data, std::ostream& ostr, U32 } bool need_comma = false; - auto iter = data.beginMap(); - auto end = data.endMap(); - for(; iter != end; ++iter) + + for(auto iter = data.beginMap(), end = data.endMap(); iter != end; ++iter) { if(need_comma) ostr << ","; need_comma = true; @@ -1445,9 +1444,8 @@ S32 LLSDBinaryFormatter::format(const LLSD& data, std::ostream& ostr, U32 option ostr.put('{'); U32 size_nbo = htonl(data.size()); ostr.write(reinterpret_cast<const char*>(&size_nbo), sizeof(U32)); - auto iter = data.beginMap(); - auto end = data.endMap(); - for(; iter != end; ++iter) + + for(auto iter = data.beginMap(), end = data.endMap(); iter != end; ++iter) { ostr.put('k'); formatString((*iter).first, ostr); diff --git a/indra/llcommon/llsdserialize_xml.cpp b/indra/llcommon/llsdserialize_xml.cpp index b0dfd63fff5176aee83a53734e57a1c0c5d10134..0b9d3e260193a549e5c4b870bee332b45fc9ff32 100644 --- a/indra/llcommon/llsdserialize_xml.cpp +++ b/indra/llcommon/llsdserialize_xml.cpp @@ -97,9 +97,8 @@ S32 LLSDXMLFormatter::format_impl(const LLSD& data, std::ostream& ostr, U32 opti else { ostr << pre << "<map>" << post; - auto iter = data.beginMap(); - auto end = data.endMap(); - for(; iter != end; ++iter) + + for(auto iter = data.beginMap(), end = data.endMap(); iter != end; ++iter) { ostr << pre << "<key>" << escapeString((*iter).first) << "</key>" << post; format_count += format_impl((*iter).second, ostr, options, level + 1); diff --git a/indra/llcommon/llsdutil.cpp b/indra/llcommon/llsdutil.cpp index c6f1e49b738a47923fd4312cc510c7b3dc34268b..a98ad7da6be578898271637e07b9fa989ab0fbbf 100644 --- a/indra/llcommon/llsdutil.cpp +++ b/indra/llcommon/llsdutil.cpp @@ -276,12 +276,9 @@ BOOL compare_llsd_with_template( //any excess is taken from the template //excess is ignored in the test LLSD value; - LLSD::map_const_iterator template_iter; - resultant_llsd = LLSD::emptyMap(); - for ( - template_iter = template_llsd.beginMap(); - template_iter != template_llsd.endMap(); + for (auto template_iter = template_llsd.beginMap(), template_end = template_llsd.endMap(); + template_iter != template_end; ++template_iter) { if ( llsd_to_test.has(template_iter->first) ) @@ -492,7 +489,7 @@ std::string llsd_matches(const LLSD& prototype, const LLSD& data, const std::str out << colon(pfx); const char* init = "Map missing keys: "; const char* sep = init; - for (auto mi = prototype.beginMap(); mi != prototype.endMap(); ++mi) + for (auto mi = prototype.beginMap(), mi_end = prototype.endMap(); mi != mi_end; ++mi) { if (! data.has(mi->first)) { @@ -507,7 +504,7 @@ std::string llsd_matches(const LLSD& prototype, const LLSD& data, const std::str } // Good, the data block contains all the keys required by the // prototype. Now match the prototype entries. - for (auto mi2 = prototype.beginMap(); mi2 != prototype.endMap(); ++mi2) + for (auto mi2 = prototype.beginMap(), mi2_end = prototype.endMap(); mi2 != mi2_end; ++mi2) { std::string match(llsd_matches(mi2->second, data[mi2->first], STRINGIZE("['" << mi2->first << "']"))); diff --git a/indra/llcommon/lluri.cpp b/indra/llcommon/lluri.cpp index 9b1ab4b89aeb3a606dd2bac4d52c3781cf0af5eb..24faf755f761b19be8d3f871962f21ea28f1e374 100644 --- a/indra/llcommon/lluri.cpp +++ b/indra/llcommon/lluri.cpp @@ -740,10 +740,9 @@ std::string LLURI::mapToQueryString(const LLSD& queryMap) if (queryMap.isMap()) { bool first_element = true; - auto iter = queryMap.beginMap(); - auto end = queryMap.endMap(); + std::ostringstream ostr; - for (; iter != end; ++iter) + for (auto iter = queryMap.beginMap(), end = queryMap.endMap(); iter != end; ++iter) { if(first_element) { diff --git a/indra/llmessage/llavatarnamecache.cpp b/indra/llmessage/llavatarnamecache.cpp index 829dc09bdecc6edc899cfeea3d7fc48d5d2a7add..7f5d274ad5a597807659dab0a02f60443ac5e618 100644 --- a/indra/llmessage/llavatarnamecache.cpp +++ b/indra/llmessage/llavatarnamecache.cpp @@ -441,8 +441,7 @@ bool LLAvatarNameCache::importFile(std::istream& istr) LLUUID agent_id; LLAvatarName av_name; - LLSD::map_const_iterator it = agents.beginMap(); - for ( ; it != agents.endMap(); ++it) + for (auto it = agents.beginMap(), end = agents.endMap(); it != end; ++it) { agent_id.set(it->first); av_name.fromLLSD( it->second ); diff --git a/indra/llmessage/llcachename.cpp b/indra/llmessage/llcachename.cpp index a7765e969367c7f062d43ac19cb1ab91570227dd..ea7d638a26701359cd03a400ce0c125f576af6d5 100644 --- a/indra/llmessage/llcachename.cpp +++ b/indra/llmessage/llcachename.cpp @@ -320,9 +320,7 @@ bool LLCacheName::importFile(std::istream& istr) // iterate over the agents S32 count = 0; LLSD agents = data[AGENTS]; - LLSD::map_iterator iter = agents.beginMap(); - LLSD::map_iterator end = agents.endMap(); - for( ; iter != end; ++iter) + for(auto iter = agents.beginMap(), end = agents.endMap(); iter != end; ++iter) { LLUUID id((*iter).first); LLSD agent = (*iter).second; @@ -344,9 +342,9 @@ bool LLCacheName::importFile(std::istream& istr) count = 0; LLSD groups = data[GROUPS]; - iter = groups.beginMap(); - end = groups.endMap(); - for( ; iter != end; ++iter) + + for(auto iter = groups.beginMap(), + end = groups.endMap(); iter != end; ++iter) { LLUUID id((*iter).first); LLSD group = (*iter).second; diff --git a/indra/llmessage/llexperiencecache.cpp b/indra/llmessage/llexperiencecache.cpp index 86417e10798b63dd92c2e2070db1accaa8ac36fe..81984da589386a2b48dc72ba8e84c8450dd7518b 100644 --- a/indra/llmessage/llexperiencecache.cpp +++ b/indra/llmessage/llexperiencecache.cpp @@ -136,7 +136,7 @@ void LLExperienceCache::importFile(std::istream& istr) LLUUID public_key; LLSD::map_const_iterator it = experiences.beginMap(); - for (; it != experiences.endMap(); ++it) + for (auto it = experiences.beginMap(), end = experiences.endMap(); it != end; ++it) { public_key.set(it->first); mCache[public_key] = it->second; diff --git a/indra/llmessage/llfiltersd2xmlrpc.cpp b/indra/llmessage/llfiltersd2xmlrpc.cpp index 62e359bcd9aeebcb0a7dd3c2fdb945a440b7ef60..cc5160132063a6124be9f154cf6b65fda5fd7c6b 100644 --- a/indra/llmessage/llfiltersd2xmlrpc.cpp +++ b/indra/llmessage/llfiltersd2xmlrpc.cpp @@ -171,9 +171,8 @@ void LLFilterSD2XMLRPC::streamOut(std::ostream& ostr, const LLSD& sd) { LL_INFOS() << "STREAM FAILURE writing struct" << LL_ENDL; } - LLSD::map_const_iterator it = sd.beginMap(); - LLSD::map_const_iterator end = sd.endMap(); - for(; it != end; ++it) + for(auto it = sd.beginMap(), end = sd.endMap(); + it != end; ++it) { ostr << "<member><name>" << xml_escape_string((*it).first) << "</name>"; diff --git a/indra/llmessage/lliohttpserver.cpp b/indra/llmessage/lliohttpserver.cpp index 15d1203c350d82c8935adbbe36117a0d12bddde6..18cc5918e7d2f1b7df441fd2c05ef435380ab9d9 100644 --- a/indra/llmessage/lliohttpserver.cpp +++ b/indra/llmessage/lliohttpserver.cpp @@ -494,9 +494,7 @@ LLIOPipe::EStatus LLHTTPResponseHeader::process_impl( LLSD headers = context[CONTEXT_RESPONSE][CONTEXT_HEADERS]; if(headers.isDefined()) { - LLSD::map_iterator iter = headers.beginMap(); - LLSD::map_iterator end = headers.endMap(); - for(; iter != end; ++iter) + for(auto iter = headers.beginMap(), end = headers.endMap(); iter != end; ++iter) { ostr << (*iter).first << ": " << (*iter).second.asString() << "\r\n"; diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp index 11b35663caf9dd50dc9f391d104986bcfd6de584..36aed4f6bcbf3d166ae1dfaa07c6456171360ce2 100644 --- a/indra/llui/llkeywords.cpp +++ b/indra/llui/llkeywords.cpp @@ -141,8 +141,7 @@ std::string LLKeywords::getArguments(LLSD& arguments) LLSD& args = (*arrayIt); if (args.isMap()) { - LLSD::map_iterator argsIt = args.beginMap(); - for ( ; argsIt != args.endMap(); ++argsIt) + for (LLSD::map_const_iterator argsIt = args.beginMap(), argsEnd = args.endMap(); argsIt != argsEnd; ++argsIt) { argString += argsIt->second.get("type").asString() + " " + argsIt->first; if (argsCount-- > 1) @@ -239,8 +238,7 @@ void LLKeywords::processTokens() addToken(LLKeywordToken::TT_TWO_SIDED_DELIMITER, "/*", LLUIColorTable::instance().getColor("SyntaxLslComment"), "Comment (multi-line)\nNon-functional commentary or disabled code", "*/" ); addToken(LLKeywordToken::TT_DOUBLE_QUOTATION_MARKS, "\"", LLUIColorTable::instance().getColor("SyntaxLslStringLiteral"), "String literal", "\"" ); - LLSD::map_iterator itr = mSyntax.beginMap(); - for ( ; itr != mSyntax.endMap(); ++itr) + for (auto itr = mSyntax.beginMap(), ite = mSyntax.endMap(); itr != ite; ++itr) { if (itr->first == "llsd-lsl-syntax-version") { @@ -300,15 +298,13 @@ void LLKeywords::processTokensGroup(const LLSD& tokens, const std::string& group if (tokens.isMap()) { - LLSD::map_const_iterator outer_itr = tokens.beginMap(); - for ( ; outer_itr != tokens.endMap(); ++outer_itr ) + for (auto outer_itr = tokens.beginMap(), outer_ite = tokens.endMap(); outer_itr != outer_ite; ++outer_itr ) { if (outer_itr->second.isMap()) { mAttributes.clear(); LLSD arguments = LLSD(); - LLSD::map_const_iterator inner_itr = outer_itr->second.beginMap(); - for ( ; inner_itr != outer_itr->second.endMap(); ++inner_itr ) + for (auto inner_itr = outer_itr->second.beginMap(), inner_ite = outer_itr->second.endMap(); inner_itr != inner_ite; ++inner_itr ) { if (inner_itr->first == "arguments") { diff --git a/indra/llui/llmultislider.cpp b/indra/llui/llmultislider.cpp index b6be4eba6c1031ed938daea343b3590283735b38..fd7c3ac9711bcd5a08f76e243d7bf445114ad205 100644 --- a/indra/llui/llmultislider.cpp +++ b/indra/llui/llmultislider.cpp @@ -140,9 +140,8 @@ void LLMultiSlider::setSliderValue(const std::string& name, F32 value, BOOL from // look at the current spot // and see if anything is there - LLSD::map_iterator mIt = mValue.beginMap(); - for(;mIt != mValue.endMap(); mIt++) { - + for( auto mIt = mValue.beginMap(), multEnd = mValue.endMap(); mIt != multEnd; ++mIt) + { F32 testVal = (F32)mIt->second.asReal() - newValue; if(testVal > -FLOAT_THRESHOLD && testVal < FLOAT_THRESHOLD && mIt->first != name) { @@ -186,7 +185,7 @@ void LLMultiSlider::setValue(const LLSD& value) LLSD::map_const_iterator mIt = value.beginMap(); mCurSlider = mIt->first; - for(; mIt != value.endMap(); mIt++) { + for(auto mEnd = value.endMap(); mIt != mEnd; ++mIt) { setSliderValue(mIt->first, (F32)mIt->second.asReal(), TRUE); } } @@ -276,9 +275,8 @@ bool LLMultiSlider::findUnusedValue(F32& initVal) // look at the current spot // and see if anything is there - LLSD::map_iterator mIt = mValue.beginMap(); - for(;mIt != mValue.endMap(); mIt++) { - + for (auto mIt = mValue.beginMap(), multEnd = mValue.endMap(); mIt != multEnd; ++mIt) + { F32 testVal = (F32)mIt->second.asReal() - initVal; if(testVal > -FLOAT_THRESHOLD && testVal < FLOAT_THRESHOLD) { hit = true; diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 53b1003598bac991e4c1b4666c1f1663426b4635..5366a5d6b68f871816e5e9f58bcd4fc178575589 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -652,8 +652,8 @@ S32 LLNotification::getSelectedOption(const LLSD& notification, const LLSD& resp //static std::string LLNotification::getSelectedOptionName(const LLSD& response) { - for (LLSD::map_const_iterator response_it = response.beginMap(); - response_it != response.endMap(); + for (LLSD::map_const_iterator response_it = response.beginMap(), response_end = response.endMap(); + response_it != response_end; ++response_it) { if (response_it->second.isBoolean() && response_it->second.asBoolean()) diff --git a/indra/llui/lluistring.cpp b/indra/llui/lluistring.cpp index 6ef16f072ab935611d3a26a664667f07eb8b3450..c1d4255bad7ab54f81622c6c0f2da2a2a11ba30f 100644 --- a/indra/llui/lluistring.cpp +++ b/indra/llui/lluistring.cpp @@ -61,8 +61,8 @@ void LLUIString::setArgs(const LLSD& sd) LL_RECORD_BLOCK_TIME(FTM_UI_STRING); if (!sd.isMap()) return; - for(LLSD::map_const_iterator sd_it = sd.beginMap(); - sd_it != sd.endMap(); + for(LLSD::map_const_iterator sd_it = sd.beginMap(), sd_end = sd.endMap(); + sd_it != sd_end; ++sd_it) { setArg(sd_it->first, sd_it->second.asString()); diff --git a/indra/llxml/llcontrol.cpp b/indra/llxml/llcontrol.cpp index fb82d351d6fbd545a502f7fd9cfa882dfbccf441..697430635ba7b63b204c557766d47e16f498a42a 100644 --- a/indra/llxml/llcontrol.cpp +++ b/indra/llxml/llcontrol.cpp @@ -997,7 +997,7 @@ U32 LLControlGroup::loadFromFile(const std::string& filename, bool set_default_v U32 validitems = 0; bool hidefromsettingseditor = false; - for(LLSD::map_const_iterator itr = settings.beginMap(); itr != settings.endMap(); ++itr) + for(LLSD::map_const_iterator itr = settings.beginMap(), ite = settings.endMap(); itr != ite; ++itr) { LLControlVariable::ePersist persist = LLControlVariable::PERSIST_NONDFT; std::string const & name = itr->first; diff --git a/indra/newview/alfloaterregiontracker.cpp b/indra/newview/alfloaterregiontracker.cpp index d3954d6fbb5c5f59d49b23457a7a4cb07d5f8975..c7d9a7f18d9238b99ef38fb3640aaed27f301513 100644 --- a/indra/newview/alfloaterregiontracker.cpp +++ b/indra/newview/alfloaterregiontracker.cpp @@ -115,7 +115,7 @@ void ALFloaterRegionTracker::refresh() const std::string& cur_region_name = gAgent.getRegion() ? gAgent.getRegion()->getName() : LLStringUtil::null; - for (LLSD::map_const_iterator it = mRegionMap.beginMap(); it != mRegionMap.endMap(); it++) + for (LLSD::map_const_iterator it = mRegionMap.beginMap(), end = mRegionMap.endMap(); it != end; it++) { const std::string& sim_name = it->first; const LLSD& data = it->second; @@ -181,7 +181,7 @@ void ALFloaterRegionTracker::requestRegionData() if (!mRegionMap.size()) return; - for (LLSD::map_const_iterator it = mRegionMap.beginMap(); it != mRegionMap.endMap(); it++) + for (LLSD::map_const_iterator it = mRegionMap.beginMap(), end = mRegionMap.endMap(); it != end; ++it) { const auto& name = it->first; if (LLSimInfo* info = LLWorldMap::getInstance()->simInfoFromName(name)) @@ -252,7 +252,7 @@ void ALFloaterRegionTracker::onRegionAddedCallback(const LLSD& notification, con { if (mRegionMap.has(name)) { - for (LLSD::map_iterator it = mRegionMap.beginMap(); it != mRegionMap.endMap(); it++) + for (LLSD::map_iterator it = mRegionMap.beginMap(), end = mRegionMap.endMap(); it != end; ++it) if (it->first == name) it->second["label"] = label; } else diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index cffed379f8964da43251c64fbf12d2f8e006eef8..d8c4d5c279b673b576e484e4abcefede78d91e3d 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -1525,8 +1525,8 @@ void LLFavoritesOrderStorage::load() LL_WARNS("FavoritesBar") << "unable to open favorites order file at '" << filename << "'" << LL_ENDL; } - for (LLSD::map_const_iterator iter = settings_llsd.beginMap(); - iter != settings_llsd.endMap(); ++iter) + for (LLSD::map_const_iterator iter = settings_llsd.beginMap(), end = settings_llsd.endMap(); + iter != end; ++iter) { mSortIndexes.insert(std::make_pair(LLUUID(iter->first), (S32)iter->second.asInteger())); } diff --git a/indra/newview/llfloaterimsession.cpp b/indra/newview/llfloaterimsession.cpp index c6e983abb55bb409f2f97600e24bdb2036586412..7e5c6a8d0f2dc0cc2582cf32f7b62f9779ff943d 100644 --- a/indra/newview/llfloaterimsession.cpp +++ b/indra/newview/llfloaterimsession.cpp @@ -1089,9 +1089,9 @@ void LLFloaterIMSession::processAgentListUpdates(const LLSD& body) if (body.isMap() && body.has("agent_updates") && body["agent_updates"].isMap()) { - LLSD::map_const_iterator update_it; - for(update_it = body["agent_updates"].beginMap(); - update_it != body["agent_updates"].endMap(); + const LLSD& agent_updates = body["agent_updates"]; + for(LLSD::map_const_iterator update_it = agent_updates.beginMap(), update_end = agent_updates.endMap(); + update_it != update_end; ++update_it) { LLUUID agent_id(update_it->first); diff --git a/indra/newview/llfloatermessagerewriter.cpp b/indra/newview/llfloatermessagerewriter.cpp index 8baae5aa0a12a50bc2be94f21060fe87f43e66e2..8aa05ea422ca78eeb5eb3d93dbd25a9e8a96e9bb 100644 --- a/indra/newview/llfloatermessagerewriter.cpp +++ b/indra/newview/llfloatermessagerewriter.cpp @@ -81,8 +81,7 @@ void LLFloaterMessageRewriter::refreshRuleList() LLSD& messages = LLMessageConfigFile::instance().mMessages; - LLSD::map_iterator map_end = messages.endMap(); - for(LLSD::map_iterator map_iter = messages.beginMap() ; map_iter != map_end; ++map_iter) + for(LLSD::map_iterator map_iter = messages.beginMap(), map_end = messages.endMap(); map_iter != map_end; ++map_iter) { std::string key((*map_iter).first); messageChooser->add(key, ADD_BOTTOM, true); diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 14d1783c35233f192dfb87807501908c962d2831..827a6d2bd7af5611414b866784b6d952d30e2668 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -3270,9 +3270,9 @@ void LLIMMgr::addPendingAgentListUpdates( //of agent_id -> "LEAVE"/"ENTER" //only want to keep last update for each agent - for ( - iter = updates["updates"].beginMap(); - iter != updates["updates"].endMap(); + const LLSD& update = updates["updates"]; + for (auto iter = update.beginMap(), end = update.endMap(); + iter != end; ++iter) { mPendingAgentListUpdates[session_id.asString()]["updates"][iter->first] = diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp index 6bc386640a69451bc7bf4d69c3ec2582eb660723..e40790d431344e279b946f010da92e578ebb8b3e 100644 --- a/indra/newview/llmutelist.cpp +++ b/indra/newview/llmutelist.cpp @@ -876,7 +876,7 @@ bool LLRenderMuteList::loadFromFile() if (visual_mute_settings.isMap() && visual_mute_settings.size() > 0) { - for (auto it = visual_mute_settings.beginMap(); it != visual_mute_settings.endMap(); ++it) + for (auto it = visual_mute_settings.beginMap(), end = visual_mute_settings.endMap(); it != end; ++it) { LLUUID agent_id(it->first); if (agent_id.isNull()) diff --git a/indra/newview/llpathfindingcharacterlist.cpp b/indra/newview/llpathfindingcharacterlist.cpp index d63daaa59b9cfabeee601fe9961659ccdf97be2a..cd0a32cad2c4fd795cefbf9b47d0eeaa375828a8 100644 --- a/indra/newview/llpathfindingcharacterlist.cpp +++ b/indra/newview/llpathfindingcharacterlist.cpp @@ -58,8 +58,9 @@ void LLPathfindingCharacterList::parseCharacterListData(const LLSD& pCharacterLi { LLPathfindingObjectMap &objectMap = getObjectMap(); - for (LLSD::map_const_iterator characterDataIter = pCharacterListData.beginMap(); - characterDataIter != pCharacterListData.endMap(); ++characterDataIter) + for (LLSD::map_const_iterator characterDataIter = pCharacterListData.beginMap(), + characterDataEnd = pCharacterListData.endMap(); + characterDataIter != characterDataEnd; ++characterDataIter) { if (characterDataIter->second.isUndefined()) continue; diff --git a/indra/newview/llpathfindinglinksetlist.cpp b/indra/newview/llpathfindinglinksetlist.cpp index 100b7fbae6cd65d984c03232bbeecf82ac017c3c..59718aad61de7a05768cc87690d4c0c70a00d903 100644 --- a/indra/newview/llpathfindinglinksetlist.cpp +++ b/indra/newview/llpathfindinglinksetlist.cpp @@ -196,8 +196,9 @@ void LLPathfindingLinksetList::parseLinksetListData(const LLSD& pLinksetListData { LLPathfindingObjectMap &objectMap = getObjectMap(); - for (LLSD::map_const_iterator linksetDataIter = pLinksetListData.beginMap(); - linksetDataIter != pLinksetListData.endMap(); ++linksetDataIter) + for (LLSD::map_const_iterator linksetDataIter = pLinksetListData.beginMap(), + linksetDataEnd = pLinksetListData.endMap(); + linksetDataIter != linksetDataEnd; ++linksetDataIter) { const std::string& uuid(linksetDataIter->first); const LLSD& linksetData = linksetDataIter->second; diff --git a/indra/newview/llsecapicerthandler.cpp b/indra/newview/llsecapicerthandler.cpp index a5558afa9ae0389644a8f368fdf0eb08b7c378cb..1a7d690d10d783ed831c248661f785369278adb0 100644 --- a/indra/newview/llsecapicerthandler.cpp +++ b/indra/newview/llsecapicerthandler.cpp @@ -63,8 +63,8 @@ bool valueCompareLLSD(const LLSD& lhs, const LLSD& rhs) { // iterate through the map, verifying the right hand side has all of the // values that the left hand side has. - for (LLSD::map_const_iterator litt = lhs.beginMap(); - litt != lhs.endMap(); + for (LLSD::map_const_iterator litt = lhs.beginMap(), lite = lhs.endMap(); + litt != lite; ++litt) { if (!rhs.has(litt->first)) @@ -75,8 +75,8 @@ bool valueCompareLLSD(const LLSD& lhs, const LLSD& rhs) // Now validate that the left hand side has everything the // right hand side has, and that the values are equal. - for (LLSD::map_const_iterator ritt = rhs.beginMap(); - ritt != rhs.endMap(); + for (LLSD::map_const_iterator ritt = rhs.beginMap(), rite = rhs.endMap(); + ritt != rite; ++ritt) { if (!lhs.has(ritt->first)) @@ -554,8 +554,8 @@ LLBasicCertificateVector::iterator LLBasicCertificateVector::find(const LLSD& pa found = true; LLSD cert_info; (*cert)->getLLSD(cert_info); - for (LLSD::map_const_iterator param = params.beginMap(); - found && param != params.endMap(); + for (LLSD::map_const_iterator param = params.beginMap(), param_end = params.endMap(); + found && param != param_end; ++param) { if ( !cert_info.has(static_cast<std::string>(param->first)) diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index d3e62748e7c6ef77ff99a4a5995af62a00d36770..879790abc2bcee07b8943e4d4b3cf522e80c4263 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -676,8 +676,9 @@ void LLIMSpeakerMgr::setSpeakers(const LLSD& speakers) if ( speakers.has("agent_info") && speakers["agent_info"].isMap() ) { - for(LLSD::map_const_iterator speaker_it = speakers["agent_info"].beginMap(); - speaker_it != speakers["agent_info"].endMap(); + const LLSD& agent_info = speakers["agent_info"]; + for(LLSD::map_const_iterator speaker_it = agent_info.beginMap(), speaker_end = agent_info.endMap(); + speaker_it != speaker_end; ++speaker_it) { LLUUID agent_id(speaker_it->first); @@ -724,8 +725,9 @@ void LLIMSpeakerMgr::updateSpeakers(const LLSD& update) if ( update.has("agent_updates") && update["agent_updates"].isMap() ) { - for(LLSD::map_const_iterator update_it = update["agent_updates"].beginMap(); - update_it != update["agent_updates"].endMap(); + const LLSD& agent_update = update["agent_updates"]; + for(LLSD::map_const_iterator update_it = agent_update.beginMap(), update_end = agent_update.endMap(); + update_it != update_end; ++update_it) { LLUUID agent_id(update_it->first); @@ -778,8 +780,9 @@ void LLIMSpeakerMgr::updateSpeakers(const LLSD& update) } else if ( update.has("updates") && update["updates"].isMap() ) { - for (LLSD::map_const_iterator update_it = update["updates"].beginMap(); - update_it != update["updates"].endMap(); + const LLSD& update_ref = update["updates"]; + for (LLSD::map_const_iterator update_it = update_ref.beginMap(), update_end = update_ref.endMap(); + update_it != update_end; ++update_it) { LLUUID agent_id(update_it->first); diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 31526e6d0eddb7e84dd6edf3565dd5ba4a761e24..c523b920df5f85261b4f33de368e2461ccfbef10 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -4073,8 +4073,7 @@ truncate_viewer_metrics(int max_regions, LLSD & metrics) reg_ordered_list_t regions_by_duration; int ind(0); - LLSD::array_const_iterator it_end(reg_map.endArray()); - for (LLSD::array_const_iterator it(reg_map.beginArray()); it_end != it; ++it, ++ind) + for (LLSD::array_const_iterator it(reg_map.beginArray()), it_end(reg_map.endArray()); it_end != it; ++it, ++ind) { LLSD::Real duration = (*it)[duration_tag].asReal(); regions_by_duration.insert(reg_ordered_list_t::value_type(duration, ind)); diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 5fe37e79408072e377f7c21bf9840a9f5b00b633..4770c5a351bba8eaedab2e05d4a5436d2358e0b5 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -330,7 +330,7 @@ void LLViewerRegionImpl::requestBaseCapabilitiesCoro(U64 regionHandle) // remove the http_result from the llsd result.erase("http_result"); - for (LLSD::map_const_iterator iter = result.beginMap(); iter != result.endMap(); ++iter) + for (LLSD::map_const_iterator iter = result.beginMap(), end = result.endMap(); iter != end; ++iter) { regionp->setCapability(iter->first, iter->second); @@ -418,7 +418,7 @@ void LLViewerRegionImpl::requestBaseCapabilitiesCompleteCoro(U64 regionHandle) // remove the http_result from the llsd result.erase("http_result"); - for (LLSD::map_const_iterator iter = result.beginMap(); iter != result.endMap(); ++iter) + for (LLSD::map_const_iterator iter = result.beginMap(), end = result.endMap(); iter != end; ++iter) { regionp->setCapabilityDebug(iter->first, iter->second); //LL_INFOS()<<"BaseCapabilitiesCompleteTracker New Caps "<<iter->first<<" "<< iter->second<<LL_ENDL; diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 201c88886e56453cb438db3efa590153875e03ee..a9b6731ecda7c0d026955584e04076c47a8b583c 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -231,8 +231,8 @@ void LLViewerTextureList::doPrefetchImages() file.close(); } S32 texture_count = 0; - for (LLSD::array_iterator iter = imagelist.beginArray(); - iter != imagelist.endArray(); ++iter) + for (LLSD::array_iterator iter = imagelist.beginArray(), end = imagelist.endArray(); + iter != end; ++iter) { LLSD imagesd = *iter; LLUUID uuid = imagesd["uuid"]; diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index 10f6ce4f7873659d79fec2346a6a6a363b9d1c90..f561db8b29d90ce8b006de56e46e74b96009dbae 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -645,8 +645,7 @@ void LLVoiceChannelGroup::voiceCallCapCoro(std::string url) result.erase(LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS); - LLSD::map_const_iterator iter; - for (iter = result.beginMap(); iter != result.endMap(); ++iter) + for (LLSD::map_const_iterator iter = result.beginMap(), end = result.endMap(); iter != end; ++iter) { LL_DEBUGS("Voice") << "LLVoiceCallCapResponder::result got " << iter->first << LL_ENDL; diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index e4212a5b9f77942cba3fe1dbb6980856adcda133..8fe13a1c8806eebecc4c322aa91e465567d3ecde 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -1085,8 +1085,8 @@ void LLSpeakerVolumeStorage::load() } - for (LLSD::map_const_iterator iter = settings_llsd.beginMap(); - iter != settings_llsd.endMap(); ++iter) + for (LLSD::map_const_iterator iter = settings_llsd.beginMap(), iter_end = settings_llsd.endMap(); + iter != iter_end; ++iter) { // Maintain compatibility with 1.23 non-linear saved volume levels F32 volume = transformFromLegacyVolume((F32)iter->second.asReal()); diff --git a/indra/newview/llwaterparamset.cpp b/indra/newview/llwaterparamset.cpp index 7418a92668d34273fed6d71d861696eefd5f5dc1..071105c5db9ec02519ea509db4be2a75f84e49cf 100644 --- a/indra/newview/llwaterparamset.cpp +++ b/indra/newview/llwaterparamset.cpp @@ -230,7 +230,8 @@ void LLWaterParamSet::mix(LLWaterParamSet& src, LLWaterParamSet& dest, F32 weigh LLSD srcVal, destVal; // LLSD holders for get/set calls, reusable // Iterate through values - for(LLSD::map_iterator iter = mParamValues.beginMap(); iter != mParamValues.endMap(); ++iter) + for(LLSD::map_iterator iter = mParamValues.beginMap(), + iter_end = mParamValues.endMap(); iter != iter_end; ++iter) { // If param exists in both src and dest, set the holder variables, otherwise skip if(src.mParamValues.has(iter->first) && dest.mParamValues.has(iter->first)) diff --git a/indra/newview/llwaterparamset.h b/indra/newview/llwaterparamset.h index 75729e68bc0b9111b4a871b9f071b9a9ace2932e..1ddec9e1160dfc9cc63fe8ead224c62f17cecd6a 100644 --- a/indra/newview/llwaterparamset.h +++ b/indra/newview/llwaterparamset.h @@ -145,7 +145,7 @@ inline void LLWaterParamSet::updateHashedNames() { mParamHashedNames.clear(); // Iterate through values - for(LLSD::map_iterator iter = mParamValues.beginMap(); iter != mParamValues.endMap(); ++iter) + for(LLSD::map_iterator iter = mParamValues.beginMap(), end = mParamValues.endMap(); iter != end; ++iter) { mParamHashedNames.emplace_back(iter->first); } diff --git a/indra/newview/llwebprofile.cpp b/indra/newview/llwebprofile.cpp index dbfd0eba1bd20f20d3a4825f4c21a582168ac58e..184286c0475de1abd48c9ed776257c4cd79d5631 100644 --- a/indra/newview/llwebprofile.cpp +++ b/indra/newview/llwebprofile.cpp @@ -84,7 +84,7 @@ LLCore::HttpHeaders::ptr_t LLWebProfile::buildDefaultHeaders() auto httpHeaders = std::make_shared<LLCore::HttpHeaders>(); LLSD headers = LLViewerMedia::getInstance()->getHeaders(); - for (LLSD::map_iterator it = headers.beginMap(); it != headers.endMap(); ++it) + for (LLSD::map_iterator it = headers.beginMap(), end = headers.endMap(); it != end; ++it) { httpHeaders->append((*it).first, (*it).second.asStringRef()); } diff --git a/indra/newview/llwlparammanager.cpp b/indra/newview/llwlparammanager.cpp index ae880dac9451c7d19608fac1b48cc4b637de4690..9c45f7edec0a3ab06a74e1bbfeee56faaa3bedfb 100644 --- a/indra/newview/llwlparammanager.cpp +++ b/indra/newview/llwlparammanager.cpp @@ -242,7 +242,7 @@ LLSD LLWLParamManager::createSkyMap(std::map<LLWLParamKey, LLWLParamSet> refs) void LLWLParamManager::addAllSkies(const LLWLParamKey::EScope scope, const LLSD& sky_presets) { - for(LLSD::map_const_iterator iter = sky_presets.beginMap(); iter != sky_presets.endMap(); ++iter) + for(LLSD::map_const_iterator iter = sky_presets.beginMap(), end = sky_presets.endMap(); iter != end; ++iter) { LLWLParamSet set; set.setAll(iter->second); diff --git a/indra/newview/llwlparamset.cpp b/indra/newview/llwlparamset.cpp index 4f9caeccb908bd6ec7dd1d1fd285e8bff28461fc..3923f60d74a6c024aebcb05b3608ff215358f44b 100644 --- a/indra/newview/llwlparamset.cpp +++ b/indra/newview/llwlparamset.cpp @@ -291,7 +291,7 @@ void LLWLParamSet::mix(LLWLParamSet& src, LLWLParamSet& dest, F32 weight) LLSD destVal; // Iterate through values - for(LLSD::map_iterator iter = mParamValues.beginMap(); iter != mParamValues.endMap(); ++iter) + for(auto iter = mParamValues.beginMap(), end = mParamValues.endMap(); iter != end; ++iter) { // If param exists in both src and dest, set the holder variables, otherwise skip if(src.mParamValues.has(iter->first) && dest.mParamValues.has(iter->first)) @@ -398,7 +398,7 @@ void LLWLParamSet::updateHashedNames() { mParamHashedNames.clear(); // Iterate through values - for(auto iter = mParamValues.beginMap(); iter != mParamValues.endMap(); ++iter) + for(auto iter = mParamValues.beginMap(), end = mParamValues.endMap(); iter != end; ++iter) { mParamHashedNames.emplace_back(iter->first); } diff --git a/indra/newview/rlvcommon.cpp b/indra/newview/rlvcommon.cpp index 50ca8daaae253c547539986d068ecc3ddafff509..131e2822d60092bbeffb7ed1aaa2cb5c46e39983 100644 --- a/indra/newview/rlvcommon.cpp +++ b/indra/newview/rlvcommon.cpp @@ -291,7 +291,7 @@ void RlvStrings::loadFromFile(const std::string& strFilePath, bool fUserOverride if (sdFileData.has("strings")) { const LLSD& sdStrings = sdFileData["strings"]; - for (LLSD::map_const_iterator itString = sdStrings.beginMap(); itString != sdStrings.endMap(); ++itString) + for (LLSD::map_const_iterator itString = sdStrings.beginMap(), itEnd = sdStrings.endMap(); itString != itEnd; ++itString) { if ( (!itString->second.has("value")) || ((fUserOverride) && (!hasString(itString->first))) ) continue; diff --git a/indra/newview/rlvfloaters.cpp b/indra/newview/rlvfloaters.cpp index 3b453708053b152601c834f888440ffc5d125a1f..1414a67ef3622982d9506f3c5c3a7e36369bddff 100644 --- a/indra/newview/rlvfloaters.cpp +++ b/indra/newview/rlvfloaters.cpp @@ -651,7 +651,7 @@ BOOL RlvFloaterStrings::postBuild() } // Populate the combo box - for (LLSD::map_const_iterator itString = m_sdStringsInfo.beginMap(); itString != m_sdStringsInfo.endMap(); ++itString) + for (LLSD::map_const_iterator itString = m_sdStringsInfo.beginMap(), itEnd = m_sdStringsInfo.endMap(); itString != itEnd; ++itString) { const LLSD& sdStringInfo = itString->second; if ( (!sdStringInfo.has("customizable")) || (!sdStringInfo["customizable"].asBoolean()) )