diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2023-02-15 15:11:35 -0500 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2023-02-15 15:11:35 -0500 |
commit | aec39a0f9f7f16a7970e96bad552ca684af57e3f (patch) | |
tree | 742bfd7fee6d2cf98a9a93b5fc3d17ff2ca6557c /indra/llcommon/llregistry.h | |
parent | 6ef3df54b3ff0dcfed3000819209a7633e53a32b (diff) | |
parent | 23a3da37a91ea80311b5820c48a12d56b989f69d (diff) |
SL-18330: Merge branch 'contribute' into sl-18330-merge
Diffstat (limited to 'indra/llcommon/llregistry.h')
-rw-r--r-- | indra/llcommon/llregistry.h | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/indra/llcommon/llregistry.h b/indra/llcommon/llregistry.h index 750fe9fdc8..e272d7a9b8 100644 --- a/indra/llcommon/llregistry.h +++ b/indra/llcommon/llregistry.h @@ -141,11 +141,9 @@ public: ptr_value_t getValue(ref_const_key_t key) { - for(scope_list_iterator_t it = mActiveScopes.begin(); - it != mActiveScopes.end(); - ++it) + for(Registrar* scope : mActiveScopes) { - ptr_value_t valuep = (*it)->getValue(key); + ptr_value_t valuep = scope->getValue(key); if (valuep != NULL) return valuep; } return mDefaultRegistrar.getValue(key); @@ -153,11 +151,9 @@ public: ptr_const_value_t getValue(ref_const_key_t key) const { - for(scope_list_const_iterator_t it = mActiveScopes.begin(); - it != mActiveScopes.end(); - ++it) + for(const Registrar* scope : mActiveScopes) { - ptr_value_t valuep = (*it)->getValue(key); + ptr_const_value_t valuep = scope->getValue(key); if (valuep != NULL) return valuep; } return mDefaultRegistrar.getValue(key); @@ -165,11 +161,9 @@ public: bool exists(ref_const_key_t key) const { - for(scope_list_const_iterator_t it = mActiveScopes.begin(); - it != mActiveScopes.end(); - ++it) + for(const Registrar* scope : mActiveScopes) { - if ((*it)->exists(key)) return true; + if (scope->exists(key)) return true; } return mDefaultRegistrar.exists(key); @@ -177,11 +171,9 @@ public: bool empty() const { - for(scope_list_const_iterator_t it = mActiveScopes.begin(); - it != mActiveScopes.end(); - ++it) + for(const Registrar* scope : mActiveScopes) { - if (!(*it)->empty()) return false; + if (!scope->empty()) return false; } return mDefaultRegistrar.empty(); |