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/llallocator_heap_profile.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/llallocator_heap_profile.cpp')
-rw-r--r-- | indra/llcommon/llallocator_heap_profile.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/indra/llcommon/llallocator_heap_profile.cpp b/indra/llcommon/llallocator_heap_profile.cpp index b2eafde1aa..6dd399e1e3 100644 --- a/indra/llcommon/llallocator_heap_profile.cpp +++ b/indra/llcommon/llallocator_heap_profile.cpp @@ -131,14 +131,13 @@ void LLAllocatorHeapProfile::parse(std::string const & prof_text) void LLAllocatorHeapProfile::dump(std::ostream & out) const { lines_t::const_iterator i; - for(i = mLines.begin(); i != mLines.end(); ++i) + for (const LLAllocatorHeapProfile::line& line : mLines) { - out << i->mLiveCount << ": " << i->mLiveSize << '[' << i->mTotalCount << ": " << i->mTotalSize << "] @"; + out << line.mLiveCount << ": " << line.mLiveSize << '[' << line.mTotalCount << ": " << line.mTotalSize << "] @"; - stack_trace::const_iterator j; - for(j = i->mTrace.begin(); j != i->mTrace.end(); ++j) + for (const stack_marker marker : line.mTrace) { - out << ' ' << *j; + out << ' ' << marker; } out << '\n'; } |