diff options
author | Fawrsk <fawrsk@gmail.com> | 2023-01-07 00:38:12 -0400 |
---|---|---|
committer | Fawrsk <fawrsk@gmail.com> | 2023-01-07 00:38:12 -0400 |
commit | 9e743c99fb69db5694c388ae33656c62e3fa0b8e (patch) | |
tree | c981c998d0439d8bd48ce98123c19de8a9a27753 /indra/llcommon/llnametable.h | |
parent | d0f115ae093e8268da2a3245d6cb2f3bcc544f1c (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.h | 8 |
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; } |