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/llinitparam.h | |
parent | d0f115ae093e8268da2a3245d6cb2f3bcc544f1c (diff) |
Cleanup for loops in llcommon to use C++11 range based for loops
Diffstat (limited to 'indra/llcommon/llinitparam.h')
-rw-r--r-- | indra/llcommon/llinitparam.h | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/indra/llcommon/llinitparam.h b/indra/llcommon/llinitparam.h index 7f5b9b4ac2..16829249b8 100644 --- a/indra/llcommon/llinitparam.h +++ b/indra/llcommon/llinitparam.h @@ -325,13 +325,11 @@ namespace LLInitParam std::string calcValueName(const value_t& value) const { value_name_map_t* map = getValueNames(); - for (typename value_name_map_t::iterator it = map->begin(), end_it = map->end(); - it != end_it; - ++it) + for (typename value_name_map_t::value_type map_pair : *map) { - if (ParamCompare<T>::equals(it->second, value)) + if (ParamCompare<T>::equals(map_pair.second, value)) { - return it->first; + return map_pair.first; } } @@ -376,11 +374,9 @@ namespace LLInitParam static std::vector<std::string> sValues; value_name_map_t* map = getValueNames(); - for (typename value_name_map_t::iterator it = map->begin(), end_it = map->end(); - it != end_it; - ++it) + for (typename value_name_map_t::value_type map_pair : *map) { - sValues.push_back(it->first); + sValues.push_back(map_pair.first); } return &sValues; } |