diff options
| author | Brad Linden <brad@lindenlab.com> | 2023-05-17 11:17:48 -0700 |
|---|---|---|
| committer | Brad Linden <brad@lindenlab.com> | 2023-05-17 11:17:48 -0700 |
| commit | 2f44377b3e98d60f1bd5b1a495c9a3aab9cfa450 (patch) | |
| tree | 0c9b22edca280d8e2a2ef280360485c139c9b829 /indra/llcommon/llassettype.cpp | |
| parent | 4758355c599d1487c11884d3f700981e011cb7b7 (diff) | |
| parent | 5a70639b7992842a9f74ec81b11bac56608b8f2e (diff) | |
Merge remote-tracking branch 'origin/main' into DRTVWR-559
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; |
