[squid-dev] Fwd: [PATCH] for loops modernization

khaled belhout khaled.belhout at gmail.com
Mon Mar 13 02:42:45 UTC 2017

---------- Forwarded message ----------
From: khaled belhout <khaled.belhout at gmail.com>
Date: 2017-03-13 3:41 GMT+01:00
Subject: Re: [squid-dev] [PATCH] for loops modernization
To: Alex Rousskov <rousskov at measurement-factory.com>

hello Alex
I used clang-tidy tool to modernize all these loops.
the tool change only the loops where it safe to change with  c++11
Range-based for loop without changing the semantics .
the tool try to generate a name for current iteration object from the
container name like "options ---> option" and use the old iterator it
we can take the advantage of the tool by selecting the changes that
make code more readable understandable and maintainable.
"decide whether the advantages of changing these loops outweigh those
costs in this case"
Thank you,

2017-03-12 16:31 GMT+01:00 Alex Rousskov <rousskov at measurement-factory.com>:
> On 03/12/2017 07:45 AM, khaled belhout wrote:
>> this patch modernize for loops using c++11 Range-based for loop
> Please use "const auto" where possible and avoid using "i" for naming
> the current iteration object.
> I am curious why did you decide to change all these loops? How did you
> select the loops to change? Normally, we avoid wide-spread polishing
> touches to minimize the price developers working with older code have to
> pay when porting back various bug fixes and features. I am trying to
> decide whether the advantages of changing these loops outweigh those
> costs in this case.
> Thank you,
> Alex.

More information about the squid-dev mailing list