summaryrefslogtreecommitdiff
path: root/indra/llcommon/llassettype.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2023-05-19 10:43:14 -0400
committerNat Goodspeed <nat@lindenlab.com>2023-05-19 10:43:14 -0400
commit7efe727f266af2119d4cd6e33fdd6c26636c1a24 (patch)
tree62cce6d78c94b58205ce43bebd693303488ddace /indra/llcommon/llassettype.cpp
parentffca94c0b89d9734fa16fde7751bd0e5785e5ea2 (diff)
parent5a70639b7992842a9f74ec81b11bac56608b8f2e (diff)
DRTVWR-558: Merge branch 'main' of secondlife/viewer into actions
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;