summaryrefslogtreecommitdiff
path: root/indra/llcommon/llassettype.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2023-07-12 10:08:56 -0400
committerNat Goodspeed <nat@lindenlab.com>2023-07-12 10:08:56 -0400
commit73d90aa9dd87986dc2ef8f39db346b71c58b181b (patch)
treea2ec930f732aaed7d7addbb22bb34b15c78d408b /indra/llcommon/llassettype.cpp
parent8e70575be833cf2056b1ceef7ef842cbc7700ce0 (diff)
parente80f0f331dbfca686e0a80c557e9b1e455c8d167 (diff)
SL-18837: Merge branch 'DRTVWR-587-maint-V' into rm-cxxstd.
Diffstat (limited to 'indra/llcommon/llassettype.cpp')
-rw-r--r--indra/llcommon/llassettype.cpp16
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;