]> git.ipfire.org Git - thirdparty/squid.git/commit
Cleanup: polish Config2 using C++ features
authorAmos Jeffries <squid3@treenet.co.nz>
Fri, 30 Sep 2016 19:15:17 +0000 (08:15 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Fri, 30 Sep 2016 19:15:17 +0000 (08:15 +1300)
commit871cbc7d9c23ad74194e31d67339fea9dfb09220
treeb95bd2d7c09ecd628da369503a960d268a94ad33
parentf7c25143533a993f431df81d4f2121a28c524fba
Cleanup: polish Config2 using C++ features

We now seem to have had several patches successfully use members
declared with default values (C++11 feature) and/or with the
"*this = Foo();" shortcut for a reset/clear method.

So I think we can start using these to replace old C-style
initialization and clear() functions.

This patch begins by replacing the Config2 use of memset(). I for one am
constantly mistaking which of the Config objects has memset() applied to
it at the global level when reconfigure happens. Now we do not need to
care, each object handles its own clearing one way or another.
src/SquidConfig.h
src/cache_cf.cc