diff options
| author | Jonathan "Geenz" Goodman <geenz@geenzo.com> | 2023-05-22 10:42:18 -0700 |
|---|---|---|
| committer | Jonathan "Geenz" Goodman <geenz@geenzo.com> | 2023-05-22 10:42:18 -0700 |
| commit | b273edd1253e088ea864d399342a0cba2fd0aaa9 (patch) | |
| tree | 317ff7c05eacccb80b3fe06d65d8f64d7ff6019d /indra/llcommon/llassettype.cpp | |
| parent | da72081582c3fd376e228cf0fceaef2ecb1948a9 (diff) | |
| parent | c6fc951f34c665d0f1cd6dcff1bea114fb0ff1a0 (diff) | |
Merge branch 'DRTVWR-559' into DRTVWR-583
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 f08cc18036..6492d888c1 100644 --- a/indra/llcommon/llassettype.cpp +++ b/indra/llcommon/llassettype.cpp @@ -151,14 +151,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; @@ -189,14 +187,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; |
