Commit 4c443098 authored by Rye Mutt's avatar Rye Mutt 🍞
Browse files

Clean up LLSD array iterator usage somewhat

parent 70c6f4cd
......@@ -1167,6 +1167,7 @@ void LLAgentWearables::sendDummyAgentWearablesUpdate()
gAgent.sendReliableMessage();
}
void LLAgentWearables::createStandardWearablesDone(S32 type, U32 index)
{
LL_INFOS() << "type " << type << " index " << index << LL_ENDL;
......
......@@ -3225,8 +3225,6 @@ void LLIMMgr::addPendingAgentListUpdates(
const LLUUID& session_id,
const LLSD& updates)
{
LLSD::map_const_iterator iter;
if (!mPendingAgentListUpdates.has(session_id.asString()))
{
//this is a new agent list update for this session
......@@ -3241,20 +3239,19 @@ void LLIMMgr::addPendingAgentListUpdates(
{
//new school update
LLSD update_types = LLSD::emptyArray();
LLSD::array_iterator array_iter;
update_types.append("agent_updates");
update_types.append("updates");
for (
array_iter = update_types.beginArray();
array_iter != update_types.endArray();
for (auto array_iter = update_types.beginArray(),
array_end = update_types.endArray();
array_iter != array_end;
++array_iter)
{
//we only want to include the last update for a given agent
for (
iter = updates[array_iter->asString()].beginMap();
iter != updates[array_iter->asString()].endMap();
const LLSD& update = updates[array_iter->asString()];
for (auto iter = update.beginMap(), end = update.endMap();
iter != end;
++iter)
{
mPendingAgentListUpdates[session_id.asString()][array_iter->asString()][iter->first] =
......
......@@ -793,8 +793,7 @@ void log_upload_error(LLCore::HttpStatus status, const LLSD& content,
LL_WARNS(LOG_MESH) << "Bad response to mesh request, no additional error information available." << LL_ENDL;
}
mav_errors_set_t::iterator mav_errors_it = mav_errors.begin();
for (; mav_errors_it != mav_errors.end(); ++mav_errors_it)
for (auto mav_errors_it = mav_errors.begin(), mav_errors_end = mav_errors.end(); mav_errors_it != mav_errors_end; ++mav_errors_it)
{
std::string mav_details = "Mav_Details_" + *mav_errors_it;
details << "Message: '" << *mav_errors_it << "': " << LLTrans::getString(mav_details) << std::endl << std::endl;
......
......@@ -705,8 +705,10 @@ void LLIMSpeakerMgr::setSpeakers(const LLSD& speakers)
}
else if ( speakers.has("agents" ) && speakers["agents"].isArray() )
{
for(LLSD::array_const_iterator speaker_it = speakers["agents"].beginArray();
speaker_it != speakers["agents"].endArray();
const LLSD& agents = speakers["agents"];
for(LLSD::array_const_iterator speaker_it = agents.beginArray(),
speaker_end = agents.endArray();
speaker_it != speaker_end;
++speaker_it)
{
const LLUUID agent_id = (*speaker_it).asUUID();
......
......@@ -2071,10 +2071,11 @@ public:
agents = input["body"]["AgentData"];
LLSD::array_iterator
locs_it = locs.beginArray(),
locs_end = locs.endArray(),
agents_it = agents.beginArray();
BOOL has_agent_data = input["body"].has("AgentData");
for (int i=0; locs_it != locs.endArray(); i++, ++locs_it)
for (int i=0; locs_it != locs_end; i++, ++locs_it)
{
U8
x = locs_it->get("X").asInteger(),
......@@ -3658,8 +3659,9 @@ void LLViewerRegion::setGodnames()
if (mSimulatorFeatures["god_names"].has("full_names"))
{
LLSD god_names = mSimulatorFeatures["god_names"]["full_names"];
for (LLSD::array_iterator itr = god_names.beginArray();
itr != god_names.endArray();
for (LLSD::array_const_iterator itr = god_names.beginArray(),
ite = god_names.endArray();
itr != ite;
++itr)
{
mGodNames.insert((*itr).asString());
......@@ -3668,8 +3670,8 @@ void LLViewerRegion::setGodnames()
if (mSimulatorFeatures["god_names"].has("last_names"))
{
LLSD god_names = mSimulatorFeatures["god_names"]["last_names"];
for (LLSD::array_iterator itr = god_names.beginArray();
itr != god_names.endArray();
for (LLSD::array_iterator itr = god_names.beginArray(), ite = god_names.endArray();
itr != ite;
++itr)
{
mGodNames.insert((*itr).asString());
......
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