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/llcallbacklist.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'indra/llcommon/llcallbacklist.cpp') diff --git a/indra/llcommon/llcallbacklist.cpp b/indra/llcommon/llcallbacklist.cpp index 541ff75ee4..aea19c6424 100644 --- a/indra/llcommon/llcallbacklist.cpp +++ b/indra/llcommon/llcallbacklist.cpp @@ -109,10 +109,9 @@ void LLCallbackList::deleteAllFunctions() void LLCallbackList::callFunctions() { - for (callback_list_t::iterator iter = mCallbackList.begin(); iter != mCallbackList.end(); ) + for (callback_list_t::value_type pair : mCallbackList) { - callback_list_t::iterator curiter = iter++; - curiter->first(curiter->second); + pair.first(pair.second); } } -- 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/llcallbacklist.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'indra/llcommon/llcallbacklist.cpp') diff --git a/indra/llcommon/llcallbacklist.cpp b/indra/llcommon/llcallbacklist.cpp index aea19c6424..93d0a035da 100644 --- a/indra/llcommon/llcallbacklist.cpp +++ b/indra/llcommon/llcallbacklist.cpp @@ -109,9 +109,10 @@ void LLCallbackList::deleteAllFunctions() void LLCallbackList::callFunctions() { - for (callback_list_t::value_type pair : mCallbackList) + for (callback_list_t::iterator iter = mCallbackList.begin(); iter != mCallbackList.end(); ) { - pair.first(pair.second); + callback_list_t::iterator curiter = iter++; + curiter->first(curiter->second); } } -- cgit v1.2.3