diff options
author | akleshchev <117672381+akleshchev@users.noreply.github.com> | 2023-01-10 11:38:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-10 11:38:34 +0200 |
commit | 9c250f1a9ee2e49505a35513cb88de54e2694e6c (patch) | |
tree | 26c8c15b117bc183386af1ee6e8b6617708aeba7 /indra/llcommon/llheteromap.cpp | |
parent | d0f115ae093e8268da2a3245d6cb2f3bcc544f1c (diff) | |
parent | 8767e6995b0c9b9ed23e07f63d290a1da8c70f17 (diff) |
SL-18893 Cleanup for loops in llcommon to use C++11 range based for loops (#44)
* Cleanup for loops in llcommon to use C++11 range based for loops
* Eliminate needless copies
Diffstat (limited to 'indra/llcommon/llheteromap.cpp')
-rw-r--r-- | indra/llcommon/llheteromap.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/indra/llcommon/llheteromap.cpp b/indra/llcommon/llheteromap.cpp index 7c19196e0c..c84e49d085 100644 --- a/indra/llcommon/llheteromap.cpp +++ b/indra/llcommon/llheteromap.cpp @@ -22,11 +22,11 @@ LLHeteroMap::~LLHeteroMap() { // For each entry in our map, we must call its deleter, which is the only // record we have of its original type. - for (TypeMap::iterator mi(mMap.begin()), me(mMap.end()); mi != me; ++mi) + for (TypeMap::value_type& pair : mMap) { - // mi->second is the std::pair; mi->second.first is the void*; - // mi->second.second points to the deleter function - (mi->second.second)(mi->second.first); - mi->second.first = NULL; + // pair.second is the std::pair; pair.second.first is the void*; + // pair.second.second points to the deleter function + (pair.second.second)(pair.second.first); + pair.second.first = NULL; } } |