summaryrefslogtreecommitdiff
path: root/indra/llcommon/llnametable.h
diff options
context:
space:
mode:
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..2c8e71263e 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;
}