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/llassettype.cpp | |
| parent | d0f115ae093e8268da2a3245d6cb2f3bcc544f1c (diff) | |
Cleanup for loops in llcommon to use C++11 range based for loops
Diffstat (limited to 'indra/llcommon/llassettype.cpp')
| -rw-r--r-- | indra/llcommon/llassettype.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/indra/llcommon/llassettype.cpp b/indra/llcommon/llassettype.cpp index e6cc06e8d0..4e6cebc5eb 100644 --- a/indra/llcommon/llassettype.cpp +++ b/indra/llcommon/llassettype.cpp @@ -150,14 +150,12 @@ LLAssetType::EType LLAssetType::lookup(const char* name) LLAssetType::EType LLAssetType::lookup(const std::string& type_name) { const LLAssetDictionary *dict = LLAssetDictionary::getInstance(); - for (LLAssetDictionary::const_iterator iter = dict->begin(); - iter != dict->end(); - iter++) + for (const LLAssetDictionary::value_type pair : *dict) { - const AssetEntry *entry = iter->second; + const AssetEntry *entry = pair.second; if (type_name == entry->mTypeName) { - return iter->first; + return pair.first; } } return AT_UNKNOWN; @@ -188,14 +186,12 @@ LLAssetType::EType LLAssetType::lookupHumanReadable(const char* name) LLAssetType::EType LLAssetType::lookupHumanReadable(const std::string& readable_name) { const LLAssetDictionary *dict = LLAssetDictionary::getInstance(); - for (LLAssetDictionary::const_iterator iter = dict->begin(); - iter != dict->end(); - iter++) + for (const LLAssetDictionary::value_type pair : *dict) { - const AssetEntry *entry = iter->second; + const AssetEntry *entry = pair.second; if (entry->mHumanName && (readable_name == entry->mHumanName)) { - return iter->first; + return pair.first; } } return AT_NONE; |
