summaryrefslogtreecommitdiff
path: root/indra/llcommon/llnametable.h
diff options
context:
space:
mode:
authorFawrsk <fawrsk@gmail.com>2023-01-07 00:38:12 -0400
committerFawrsk <fawrsk@gmail.com>2023-01-07 00:38:12 -0400
commit9e743c99fb69db5694c388ae33656c62e3fa0b8e (patch)
treec981c998d0439d8bd48ce98123c19de8a9a27753 /indra/llcommon/llnametable.h
parentd0f115ae093e8268da2a3245d6cb2f3bcc544f1c (diff)
Cleanup for loops in llcommon to use C++11 range based for loops
Diffstat (limited to 'indra/llcommon/llnametable.h')
-rw-r--r--indra/llcommon/llnametable.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/indra/llcommon/llnametable.h b/indra/llcommon/llnametable.h
index d3283543f3..51247d61ba 100644
--- a/indra/llcommon/llnametable.h
+++ b/indra/llcommon/llnametable.h
@@ -86,12 +86,10 @@ public:
// O(N)! (currently only used in one place... (newsim/llstate.cpp))
const char *resolveData(const DATA &data) const
{
- const_iter_t iter = mNameMap.begin();
- const_iter_t end = mNameMap.end();
- for (; iter != end; ++iter)
+ for (const name_map_t::value_type pair : mNameMap)
{
- if (iter->second == data)
- return iter->first;
+ if (pair.second == data)
+ return pair.first;
}
return NULL;
}