diff options
| author | Nat Goodspeed <nat@lindenlab.com> | 2023-06-01 09:57:57 -0400 |
|---|---|---|
| committer | Nat Goodspeed <nat@lindenlab.com> | 2023-06-01 09:57:57 -0400 |
| commit | d844da2a6c5fc1a75e606150bb070fdb787698d3 (patch) | |
| tree | 349ecda36a5a561d6e564e2cc3db39121fd8946b /indra/llcommon/llassettype.cpp | |
| parent | 8a74efa38ba631be5400c4912a6339310968c9d7 (diff) | |
| parent | 7d05ade3f10563e8c202106e00cb3d273ab13338 (diff) | |
SL-18330: Merge branch 'xcode-14.3' into fix-monterey
to pick up new merge from main.
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..4c84223dad 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; |
