Fix clang warnings about copies vs references:

A recent version of clang notes a number of places in range
for loops where the code base was making unnecessary copies
or using const lvalue references to extend lifetimes.  This
fixes the places that clang identified.
This commit is contained in:
Scott Schurr
2021-05-20 15:45:56 -07:00
committed by manojsdoshi
parent 22cc9a254a
commit 2a7c573dec
13 changed files with 21 additions and 19 deletions

View File

@@ -99,7 +99,7 @@ void
ValidatorList::PublisherListStats::mergeDispositions(
PublisherListStats const& src)
{
for (auto const [disp, count] : src.dispositions)
for (auto const& [disp, count] : src.dispositions)
{
dispositions[disp] += count;
}