From 9e743c99fb69db5694c388ae33656c62e3fa0b8e Mon Sep 17 00:00:00 2001 From: Fawrsk Date: Sat, 7 Jan 2023 00:38:12 -0400 Subject: Cleanup for loops in llcommon to use C++11 range based for loops --- indra/llcommon/llerror.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'indra/llcommon/llerror.cpp') diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp index 519426e9d1..c5eb515292 100644 --- a/indra/llcommon/llerror.cpp +++ b/indra/llcommon/llerror.cpp @@ -586,11 +586,9 @@ namespace void Globals::invalidateCallSites() { - for (CallSiteVector::const_iterator i = callSites.begin(); - i != callSites.end(); - ++i) + for (LLError::CallSite* site : callSites) { - (*i)->invalidate(); + site->invalidate(); } callSites.clear(); @@ -1224,12 +1222,8 @@ namespace std::string escaped_message; LLMutexLock lock(&s->mRecorderMutex); - for (Recorders::const_iterator i = s->mRecorders.begin(); - i != s->mRecorders.end(); - ++i) + for (LLError::RecorderPtr r : s->mRecorders) { - LLError::RecorderPtr r = *i; - if (!r->enabled()) { continue; -- cgit v1.2.3 From 8767e6995b0c9b9ed23e07f63d290a1da8c70f17 Mon Sep 17 00:00:00 2001 From: Fawrsk Date: Mon, 9 Jan 2023 19:19:12 -0400 Subject: Eliminate needless copies --- indra/llcommon/llerror.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llcommon/llerror.cpp') diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp index c5eb515292..310da2c9f0 100644 --- a/indra/llcommon/llerror.cpp +++ b/indra/llcommon/llerror.cpp @@ -1222,7 +1222,7 @@ namespace std::string escaped_message; LLMutexLock lock(&s->mRecorderMutex); - for (LLError::RecorderPtr r : s->mRecorders) + for (LLError::RecorderPtr& r : s->mRecorders) { if (!r->enabled()) { -- cgit v1.2.3