Commit 6e102a69 authored by Rye Mutt's avatar Rye Mutt 🍞
Browse files

Giant cleanup of llsd array end iterator abuse

parent 5525ddd8
......@@ -109,7 +109,7 @@ nlohmann::json LlsdToJson(const LLSD &val)
}
break;
case LLSD::TypeArray:
for (auto it = val.beginArray(); it != val.endArray(); ++it)
for (auto it = val.beginArray(), end = val.endArray(); it != end; ++it)
{
result.push_back(LlsdToJson(*it));
}
......
......@@ -267,8 +267,8 @@ void LLParamSDParserUtilities::readSDValues(read_sd_cb_t cb, const LLSD& sd, LLI
}
else if (sd.isArray())
{
for (auto it = sd.beginArray();
it != sd.endArray();
for (auto it = sd.beginArray(), end = sd.endArray();
it != end;
++it)
{
stack.push_back(make_pair(std::string(), true));
......
......@@ -450,8 +450,8 @@ LLURI LLURI::buildHTTP(const std::string& prefix,
if (path.isArray())
{
// break out and escape each path component
for (auto it = path.beginArray();
it != path.endArray();
for (auto it = path.beginArray(), end = path.endArray();
it != end;
++it)
{
LL_DEBUGS() << "PATH: inserting " << it->asString() << LL_ENDL;
......
......@@ -210,8 +210,8 @@ void LLAvatarNameCache::handleAvNameCacheSuccess(const LLSD &data, const LLSD &h
F64 now = LLFrameTimer::getTotalSeconds();
const LLSD& agents = data["agents"];
LLSD::array_const_iterator it = agents.beginArray();
for (; it != agents.endArray(); ++it)
for (LLSD::array_const_iterator it = agents.beginArray(), end = agents.endArray(); it != end; ++it)
{
const LLSD& row = *it;
LLUUID agent_id = row["id"].asUUID();
......@@ -237,8 +237,9 @@ void LLAvatarNameCache::handleAvNameCacheSuccess(const LLSD &data, const LLSD &h
LL_WARNS("AvNameCache") << "LLAvatarNameResponder::result " << num_unresolved << " unresolved ids; "
<< "expires in " << expires - now << " seconds"
<< LL_ENDL;
it = unresolved_agents.beginArray();
for (; it != unresolved_agents.endArray(); ++it)
for (LLSD::array_const_iterator it = unresolved_agents.beginArray(), end = unresolved_agents.endArray();
it != end; ++it)
{
const LLUUID& agent_id = *it;
......
......@@ -169,8 +169,8 @@ void LLExperienceCache::exportFile(std::ostream& ostr) const
void LLExperienceCache::bootstrap(const LLSD& legacyKeys, int initialExpiration)
{
LLExperienceCacheImpl::mapKeys(legacyKeys);
LLSD::array_const_iterator it = legacyKeys.beginArray();
for (/**/; it != legacyKeys.endArray(); ++it)
for (LLSD::array_const_iterator it = legacyKeys.beginArray(), end = legacyKeys.endArray(); it != end; ++it)
{
LLSD experience = *it;
if (experience.has(EXPERIENCE_ID))
......@@ -279,10 +279,10 @@ void LLExperienceCache::requestExperiencesCoro(LLCoreHttpUtil::HttpCoroutineAdap
return;
}
LLSD experiences = result["experience_keys"];
const LLSD& experiences = result["experience_keys"];
for (LLSD::array_const_iterator it = experiences.beginArray();
it != experiences.endArray(); ++it)
for (LLSD::array_const_iterator it = experiences.beginArray(), end = experiences.endArray();
it != end; ++it)
{
const LLSD& row = *it;
LLUUID public_key = row[EXPERIENCE_ID].asUUID();
......@@ -293,10 +293,10 @@ void LLExperienceCache::requestExperiencesCoro(LLCoreHttpUtil::HttpCoroutineAdap
processExperience(public_key, row);
}
LLSD error_ids = result["error_ids"];
const LLSD& error_ids = result["error_ids"];
for (LLSD::array_const_iterator errIt = error_ids.beginArray();
errIt != error_ids.endArray(); ++errIt)
for (LLSD::array_const_iterator errIt = error_ids.beginArray(), end = error_ids.endArray() ;
errIt != end; ++errIt)
{
LLUUID id = errIt->asUUID();
LLSD exp;
......@@ -639,7 +639,7 @@ void LLExperienceCache::findExperienceByNameCoro(LLCoreHttpUtil::HttpCoroutineAd
result.erase(LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS);
const LLSD& experiences = result["experience_keys"];
for (LLSD::array_const_iterator it = experiences.beginArray(); it != experiences.endArray(); ++it)
for (LLSD::array_const_iterator it = experiences.beginArray(), end = experiences.endArray(); it != end; ++it)
{
insert(*it);
}
......@@ -901,8 +901,7 @@ void LLExperienceCache::updateExperienceCoro(LLCoreHttpUtil::HttpCoroutineAdapte
//=========================================================================
void LLExperienceCacheImpl::mapKeys(const LLSD& legacyKeys)
{
LLSD::array_const_iterator exp = legacyKeys.beginArray();
for (/**/; exp != legacyKeys.endArray(); ++exp)
for (LLSD::array_const_iterator exp = legacyKeys.beginArray(), end = legacyKeys.endArray(); exp != end; ++exp)
{
if (exp->has(LLExperienceCacheImpl::EXPERIENCE_ID) && exp->has(LLExperienceCacheImpl::PRIVATE_KEY))
{
......
......@@ -245,8 +245,9 @@ void LLConsole::Paragraph::makeParagraphColorSegments (const LLColor4 &color)
LLSD color_sd = color.getValue();
paragraph_color_segments[0]["color"]=color_sd;
for(LLSD::array_const_iterator color_segment_it = paragraph_color_segments.beginArray();
color_segment_it != paragraph_color_segments.endArray();
for(LLSD::array_const_iterator color_segment_it = paragraph_color_segments.beginArray(),
color_segment_end = paragraph_color_segments.endArray();
color_segment_it != color_segment_end;
++color_segment_it)
{
LLSD color_llsd = (*color_segment_it)["color"];
......
......@@ -457,8 +457,9 @@ void LLFloaterReg::registerControlVariables()
}
const LLSD& exclude_list = LLUI::getInstance()->mSettingGroups["config"]->getLLSD("always_showable_floaters");
for (LLSD::array_const_iterator iter = exclude_list.beginArray();
iter != exclude_list.endArray();
for (LLSD::array_const_iterator iter = exclude_list.beginArray(),
end = exclude_list.endArray();
iter != end;
iter++)
{
sAlwaysShowableList.insert(iter->asString());
......
......@@ -135,8 +135,7 @@ std::string LLKeywords::getArguments(LLSD& arguments)
if (arguments.isArray())
{
U32 argsCount = arguments.size();
LLSD::array_iterator arrayIt = arguments.beginArray();
for ( ; arrayIt != arguments.endArray(); ++arrayIt)
for (LLSD::array_iterator arrayIt = arguments.beginArray(), arrayEnd = arguments.endArray(); arrayIt != arrayEnd; ++arrayIt)
{
LLSD& args = (*arrayIt);
if (args.isMap())
......
......@@ -261,8 +261,9 @@ LLSD LLNotificationForm::asLLSD() const
LLSD LLNotificationForm::getElement(const std::string& element_name)
{
for (LLSD::array_const_iterator it = mFormData.beginArray();
it != mFormData.endArray();
for (LLSD::array_const_iterator it = mFormData.beginArray(),
end = mFormData.endArray();
it != end;
++it)
{
if ((*it)["name"].asString() == element_name) return (*it);
......@@ -273,8 +274,9 @@ LLSD LLNotificationForm::getElement(const std::string& element_name)
bool LLNotificationForm::hasElement(const std::string& element_name) const
{
for (LLSD::array_const_iterator it = mFormData.beginArray();
it != mFormData.endArray();
for (LLSD::array_const_iterator it = mFormData.beginArray(),
end = mFormData.endArray();
it != end;
++it)
{
if ((*it)["name"].asString() == element_name) return true;
......@@ -288,7 +290,7 @@ void LLNotificationForm::getElements(LLSD& elements, S32 offset)
LLSD::array_const_iterator it = mFormData.beginArray() + offset;
//Keeps track of only the dynamic elements
for(; it != mFormData.endArray(); ++it)
for(LLSD::array_const_iterator end = mFormData.endArray(); it != end; ++it)
{
elements.append(*it);
}
......@@ -296,8 +298,9 @@ void LLNotificationForm::getElements(LLSD& elements, S32 offset)
bool LLNotificationForm::getElementEnabled(const std::string& element_name) const
{
for (LLSD::array_const_iterator it = mFormData.beginArray();
it != mFormData.endArray();
for (LLSD::array_const_iterator it = mFormData.beginArray(),
end = mFormData.endArray();
it != end;
++it)
{
if ((*it)["name"].asString() == element_name)
......@@ -311,8 +314,9 @@ bool LLNotificationForm::getElementEnabled(const std::string& element_name) cons
void LLNotificationForm::setElementEnabled(const std::string& element_name, bool enabled)
{
for (LLSD::array_iterator it = mFormData.beginArray();
it != mFormData.endArray();
for (LLSD::array_iterator it = mFormData.beginArray(),
end = mFormData.endArray();
it != end;
++it)
{
if ((*it)["name"].asString() == element_name)
......@@ -339,8 +343,9 @@ void LLNotificationForm::append(const LLSD& sub_form)
{
if (sub_form.isArray())
{
for (LLSD::array_const_iterator it = sub_form.beginArray();
it != sub_form.endArray();
for (LLSD::array_const_iterator it = sub_form.beginArray(),
end = sub_form.endArray();
it != end;
++it)
{
mFormData.append(*it);
......@@ -350,8 +355,9 @@ void LLNotificationForm::append(const LLSD& sub_form)
void LLNotificationForm::formatElements(const LLSD& substitutions)
{
for (LLSD::array_iterator it = mFormData.beginArray();
it != mFormData.endArray();
for (LLSD::array_iterator it = mFormData.beginArray(),
end = mFormData.endArray();
it != end;
++it)
{
// format "text" component of each form element
......@@ -372,8 +378,9 @@ void LLNotificationForm::formatElements(const LLSD& substitutions)
std::string LLNotificationForm::getDefaultOption()
{
for (LLSD::array_const_iterator it = mFormData.beginArray();
it != mFormData.endArray();
for (LLSD::array_const_iterator it = mFormData.beginArray(),
end = mFormData.endArray();
it != end;
++it)
{
if ((*it)["default"]) return (*it)["name"].asString();
......
......@@ -3092,8 +3092,8 @@ LLScrollListItem* LLScrollListCtrl::addSimpleElement(const std::string& value, E
void LLScrollListCtrl::setValue(const LLSD& value )
{
LLSD::array_const_iterator itor;
for (itor = value.beginArray(); itor != value.endArray(); ++itor)
for (LLSD::array_const_iterator itor = value.beginArray(), end = value.endArray();
itor != end; ++itor)
{
addElement(*itor);
}
......
......@@ -83,7 +83,8 @@ S32 LLSpellChecker::getSuggestions(const std::string& word, std::vector<std::str
const LLSD LLSpellChecker::getDictionaryData(const std::string& dict_language)
{
for (LLSD::array_const_iterator it = mDictMap.beginArray(); it != mDictMap.endArray(); ++it)
for (LLSD::array_const_iterator it = mDictMap.beginArray(), end = mDictMap.endArray();
it != end; ++it)
{
const LLSD& dict_entry = *it;
if (dict_language == dict_entry["language"].asString())
......@@ -108,7 +109,8 @@ void LLSpellChecker::setDictionaryData(const LLSD& dict_info)
return;
}
for (LLSD::array_iterator it = mDictMap.beginArray(); it != mDictMap.endArray(); ++it)
for (LLSD::array_iterator it = mDictMap.beginArray(), end = mDictMap.endArray();
it != end; ++it)
{
LLSD& dict_entry = *it;
if (dict_language == dict_entry["language"].asString())
......@@ -151,7 +153,8 @@ void LLSpellChecker::refreshDictionaryMap()
{
LLSD custom_dict_map;
LLSDSerialize::fromXMLDocument(custom_dict_map, custom_file);
for (LLSD::array_iterator it = custom_dict_map.beginArray(); it != custom_dict_map.endArray(); ++it)
for (LLSD::array_iterator it = custom_dict_map.beginArray(), end = custom_dict_map.endArray();
it != end; ++it)
{
LLSD& dict_info = *it;
dict_info["user_installed"] = true;
......@@ -162,7 +165,8 @@ void LLSpellChecker::refreshDictionaryMap()
// Look for installed dictionaries
std::string tmp_app_path, tmp_user_path;
for (LLSD::array_iterator it = mDictMap.beginArray(); it != mDictMap.endArray(); ++it)
for (LLSD::array_iterator it = mDictMap.beginArray(), end = mDictMap.endArray();
it != end; ++it)
{
LLSD& sdDict = *it;
tmp_app_path = (sdDict.has("name")) ? app_path + sdDict["name"].asString() : LLStringUtil::null;
......@@ -417,7 +421,8 @@ void LLSpellChecker::removeDictionary(const std::string& dict_language)
}
LLSD dict_map = loadUserDictionaryMap();
for (LLSD::array_const_iterator it = dict_map.beginArray(); it != dict_map.endArray(); ++it)
for (LLSD::array_const_iterator it = dict_map.beginArray(), end = dict_map.endArray();
it != end; ++it)
{
const LLSD& dict_info = *it;
if (dict_info["language"].asString() == dict_language)
......
......@@ -138,25 +138,25 @@ LLSD LLTextParser::parsePartialLineHighlights(const std::string &text, const LLC
S32 retcount=0;
//FIXME These loops should be wrapped into a subroutine.
for (LLSD::array_iterator iter = start_llsd.beginArray();
iter != start_llsd.endArray();++iter)
for (LLSD::array_const_iterator iter = start_llsd.beginArray(), end = start_llsd.endArray();
iter != end; ++iter)
{
LLSD highlight = *iter;
ret_llsd[retcount++]=highlight;
ret_llsd[retcount++] = highlight;
}
for (LLSD::array_iterator iter = middle_llsd.beginArray();
iter != middle_llsd.endArray();++iter)
for (LLSD::array_const_iterator iter = middle_llsd.beginArray(), end = middle_llsd.endArray();
iter != end; ++iter)
{
LLSD highlight = *iter;
ret_llsd[retcount++]=highlight;
ret_llsd[retcount++] = highlight;
}
for (LLSD::array_iterator iter = end_llsd.beginArray();
iter != end_llsd.endArray();++iter)
for (LLSD::array_const_iterator iter = end_llsd.beginArray(), end = end_llsd.endArray();
iter != end; ++iter)
{
LLSD highlight = *iter;
ret_llsd[retcount++]=highlight;
ret_llsd[retcount++] = highlight;
}
return ret_llsd;
......
......@@ -1016,7 +1016,8 @@ U32 LLControlGroup::loadFromFile(const std::string& filename, bool set_default_v
if(pos!=std::string::npos)
{
const std::string dir = filename.substr(0,++pos);
for(LLSD::array_const_iterator array_itr = control_map.beginArray(); array_itr != control_map.endArray(); ++array_itr)
for(LLSD::array_const_iterator array_itr = control_map.beginArray(), array_end = control_map.endArray();
array_itr != array_end; ++array_itr)
validitems+=loadFromFile(dir+(*array_itr).asString(),set_default_values);
}
}
......
......@@ -749,8 +749,7 @@ void LLFloaterAvatarPicker::processResponse(const LLUUID& query_id, const LLSD&
search_results->deleteAllItems();
LLSD item;
LLSD::array_const_iterator it = agents.beginArray();
for ( ; it != agents.endArray(); ++it)
for (LLSD::array_const_iterator it = agents.beginArray(), end = agents.endArray(); it != end; ++it)
{
const LLSD& row = *it;
if (row["id"].asUUID() != gAgent.getID() || !mExcludeAgentFromSearchResults)
......
......@@ -867,9 +867,8 @@ void LLFloaterIMSession::sessionInitReplyReceived(const LLUUID& im_session_id)
//need to send delayed messages collected while waiting for session initialization
if (mQueuedMsgsForInit.size())
{
LLSD::array_iterator iter;
for ( iter = mQueuedMsgsForInit.beginArray();
iter != mQueuedMsgsForInit.endArray(); ++iter)
for (LLSD::array_const_iterator iter = mQueuedMsgsForInit.beginArray(), end = mQueuedMsgsForInit.endArray();
iter != end; ++iter)
{
LLIMModel::sendMessage(iter->asString(), mSessionID,
mOtherParticipantUUID, mDialog);
......
......@@ -386,8 +386,9 @@ void LLFloaterPathfindingObjects::addObjectToScrollList(const LLPathfindingObjec
rowParams.value = pObjectPtr->getUUID().asString();
llassert(pScrollListItemData.isArray());
for (LLSD::array_const_iterator cellIter = pScrollListItemData.beginArray();
cellIter != pScrollListItemData.endArray(); ++cellIter)
for (LLSD::array_const_iterator cellIter = pScrollListItemData.beginArray(),
cellEnd = pScrollListItemData.endArray();
cellIter != cellEnd; ++cellIter)
{
const LLSD &cellElement = *cellIter;
......
......@@ -4062,7 +4062,7 @@ void LLPanelEstateAccess::requestEstateGetAccessCoro(std::string url)
allowed_agent_name_list->clearSortOrder();
allowed_agent_name_list->deleteAllItems();
for (LLSD::array_const_iterator it = result["AllowedAgents"].beginArray(); it != result["AllowedAgents"].endArray(); ++it)
for (LLSD::array_const_iterator it = result["AllowedAgents"].beginArray(), end = result["AllowedAgents"].endArray(); it != end; ++it)
{
LLUUID id = (*it)["id"].asUUID();
allowed_agent_name_list->addNameItem(id);
......@@ -4081,7 +4081,7 @@ void LLPanelEstateAccess::requestEstateGetAccessCoro(std::string url)
banned_agent_name_list->clearSortOrder();
banned_agent_name_list->deleteAllItems();
for (LLSD::array_const_iterator it = result["BannedAgents"].beginArray(); it != result["BannedAgents"].endArray(); ++it)
for (LLSD::array_const_iterator it = result["BannedAgents"].beginArray(), end = result["BannedAgents"].endArray(); it != end; ++it)
{
LLSD item;
item["id"] = (*it)["id"].asUUID();
......@@ -4124,7 +4124,7 @@ void LLPanelEstateAccess::requestEstateGetAccessCoro(std::string url)
allowed_group_name_list->clearSortOrder();
allowed_group_name_list->deleteAllItems();
for (LLSD::array_const_iterator it = result["AllowedGroups"].beginArray(); it != result["AllowedGroups"].endArray(); ++it)
for (LLSD::array_const_iterator it = result["AllowedGroups"].beginArray(), end = result["AllowedGroups"].endArray(); it != end; ++it)
{
LLUUID id = (*it)["id"].asUUID();
allowed_group_name_list->addGroupNameItem(id);
......@@ -4143,7 +4143,7 @@ void LLPanelEstateAccess::requestEstateGetAccessCoro(std::string url)
estate_manager_name_list->clearSortOrder();
estate_manager_name_list->deleteAllItems();
for (LLSD::array_const_iterator it = result["Managers"].beginArray(); it != result["Managers"].endArray(); ++it)
for (LLSD::array_const_iterator it = result["Managers"].beginArray(), end = result["Managers"].endArray(); it != end; ++it)
{
LLUUID id = (*it)["agent_id"].asUUID();
estate_manager_name_list->addNameItem(id);
......
......@@ -811,8 +811,9 @@ void BGFolderHttpHandler::processFailure(LLCore::HttpStatus status, LLCore::Http
if constexpr (/* DISABLES CODE */ (false))
{
// timed out or curl failure
for (LLSD::array_const_iterator folder_it = mRequestSD["folders"].beginArray();
folder_it != mRequestSD["folders"].endArray();
for (LLSD::array_const_iterator folder_it = mRequestSD["folders"].beginArray(),
folder_end = mRequestSD["folders"].endArray();
folder_it != folder_end;
++folder_it)
{
LLSD folder_sd(*folder_it);
......@@ -848,8 +849,9 @@ void BGFolderHttpHandler::processFailure(const char * const reason, LLCore::Http
LLInventoryModelBackgroundFetch *fetcher = LLInventoryModelBackgroundFetch::getInstance();
if constexpr (/* DISABLES CODE */ (true))
{
for (LLSD::array_const_iterator folder_it = mRequestSD["folders"].beginArray();
folder_it != mRequestSD["folders"].endArray();
for (LLSD::array_const_iterator folder_it = mRequestSD["folders"].beginArray(),
folder_end = mRequestSD["folders"].endArray();
folder_it != folder_end;
++folder_it)
{
LLSD folder_sd(*folder_it);
......
......@@ -129,7 +129,7 @@ namespace {
LLSD content = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS_CONTENT];
if (content.isArray())
{
for (LLSD::array_iterator it = content.beginArray(); it != content.endArray(); ++it)
for (LLSD::array_const_iterator it = content.beginArray(), end = content.endArray(); it != end; ++it)
{
if (!description.empty())
description += "\n";
......@@ -877,17 +877,18 @@ void LLMarketplaceData::getSLMListingsCoro(LLUUID folderId)
log_SLM_infos("Get /listings", static_cast<U32>(status.getType()), result);
// Extract the info from the results
for (LLSD::array_iterator it = result["listings"].beginArray();
it != result["listings"].endArray(); ++it)
for (LLSD::array_const_iterator it = result["listings"].beginArray(), end = result["listings"].endArray();
it != end; ++it)
{
LLSD listing = *it;
int listingId = listing["id"].asInteger();
bool isListed = listing["is_listed"].asBoolean();
std::string editUrl = listing["edit_url"].asString();
LLUUID folderUuid = listing["inventory_info"]["listing_folder_id"].asUUID();
LLUUID versionUuid = listing["inventory_info"]["version_folder_id"].asUUID();
int count = listing["inventory_info"]["count_on_hand"].asInteger();
const LLSD& listing_inv_info = listing["inventory_info"];
LLUUID folderUuid = listing_inv_info["listing_folder_id"].asUUID();
LLUUID versionUuid = listing_inv_info["version_folder_id"].asUUID();
int count = listing_inv_info["count_on_hand"].asInteger();
if (folderUuid.notNull())
{
......@@ -950,8 +951,8 @@ void LLMarketplaceData::getSingleListingCoro(S32 listingId, LLUUID folderId)
// Extract the info from the results
for (LLSD::array_iterator it = result["listings"].beginArray();
it != result["listings"].endArray(); ++it)
for (LLSD::array_const_iterator it = result["listings"].beginArray(), end = result["listings"].endArray();
it != end; ++it)
{
LLSD listing = *it;
......@@ -1021,8 +1022,8 @@ void LLMarketplaceData::createSLMListingCoro(LLUUID folderId, LLUUID versionId,
log_SLM_infos("Post /listings", status.getType(), result);
// Extract the info from the results
for (LLSD::array_iterator it = result["listings"].beginArray();
it != result["listings"].endArray(); ++it)
for (LLSD::array_const_iterator it = result["listings"].beginArray(), end = result["listings"].endArray();
it != end; ++it)
{
LLSD listing = *it;
......@@ -1087,8 +1088,8 @@ void LLMarketplaceData::updateSLMListingCoro(LLUUID folderId, S32 listingId, LLU
log_SLM_infos("Put /listing", status.getType(), result);
// Extract the info from the Json string
for (LLSD::array_iterator it = result["listings"].beginArray();
it != result["listings"].endArray(); ++it)
for (LLSD::array_const_iterator it = result["listings"].beginArray(), end = result["listings"].endArray();
it != end; ++it)
{
LLSD listing = *it;
......@@ -1169,8 +1170,8 @@ void LLMarketplaceData::associateSLMListingCoro(LLUUID folderId, S32 listingId,
log_SLM_infos("Put /associate_inventory", status.getType(), result);
for (LLSD::array_iterator it = result["listings"].beginArray();
it != result["listings"].endArray(); ++it)
for (LLSD::array_const_iterator it = result["listings"].beginArray(), end = result["listings"].endArray();
it != end; ++it)
{
LLSD listing = *it;
......@@ -1240,8 +1241,8 @@ void LLMarketplaceData::deleteSLMListingCoro(S32 listingId)
log_SLM_infos("Delete /listing", status.getType(), result);
for (LLSD::array_iterator it = result["listings"].beginArray();
it != result["listings"].endArray(); ++it)
for (LLSD::array_const_iterator it = result["listings"].beginArray(), end = result["listings"].endArray();
it != end; ++it)
{
LLSD listing = *it;
......
......@@ -430,7 +430,7 @@ void LLMaterialMgr::onGetResponse(bool success, const LLSD& content, const LLUUI
llassert(response_data.isArray());
LL_DEBUGS("Materials") << "response has "<< response_data.size() << " materials" << LL_ENDL;
for (LLSD::array_const_iterator itMaterial = response_data.beginArray(); itMaterial != response_data.endArray(); ++itMaterial)
for (LLSD::array_const_iterator itMaterial = response_data.beginArray(), itEnd = response_data.endArray(); itMaterial != itEnd; ++itMaterial)
{
const LLSD& material_data = *itMaterial;
llassert(material_data.isMap());
......@@ -474,7 +474,7 @@ void LLMaterialMgr::onGetAllResponse(bool success, const LLSD& content, const LL
llassert(response_data.isArray());
LL_DEBUGS("Materials") << "response has "<< response_data.size() << " materials" << LL_ENDL;
for (LLSD::array_const_iterator itMaterial = response_data.beginArray(); itMaterial != response_data.endArray(); ++itMaterial)
for (LLSD::array_const_iterator itMaterial = response_data.beginArray(), itEnd = response_data.endArray(); itMaterial != itEnd; ++itMaterial)
{
const LLSD& material_data = *itMaterial;
llassert(material_data.isMap());
......@@ -539,7 +539,8 @@ void LLMaterialMgr::onPutResponse(bool success, const LLSD& content)
{
llassert(response_data.isArray());
LL_DEBUGS("Materials") << "response has "<< response_data.size() << " materials" << LL_ENDL;
for (LLSD::array_const_iterator faceIter = response_data.beginArray(); faceIter != response_data.endArray(); ++faceIter)
for (LLSD::array_const_iterator faceIter = response_data.beginArray(), faceEnd = response_data.endArray();
faceIter != faceEnd; ++faceIter)
{
# if defined(SHOW_ASSERT)
const LLSD& face_data = *faceIter; // conditional to avoid unused variable warning
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment