[squid-dev] [PATCH] cleanup removal of needless get()
Alex Rousskov
rousskov at measurement-factory.com
Sat Oct 1 18:23:29 UTC 2016
On 09/30/2016 11:05 PM, Amos Jeffries wrote:
> The SSL code in particular contains a lot of calls to the get() on
> various Pointer objects from the general code.
>
> Now that C++11 gives our Pointer better boolean operators, and
> dereference oerators have been added. A bunch of these calls are not
> needing to be explicit. Remove them and use the available class
> operators for more easily read code.
>
> NOTE that this does not include the get() to produce raw-pointers for
> library API calls.
>
> Also, this patch does not seek to be all-inclusive sweepign change. It
> was built using a grep for if-statements using get() output as their
> sole boolean condition and polishing the code surrounding. So there are
> likely many other uses that can be removed in other patches. This is
> just incremental polish.
+1 if you post a simple script that will make these kind of changes in
an arbitrary Squid branch. I have not checked each change but I trust
that you have done that already.
-0 otherwise. We should not be using .get() when it is not needed, but,
without automation, the post-change merging expenses outweigh the
advantages of this partial sweeping change.
Alex.
More information about the squid-dev
mailing list