From: Amos Jeffries Date: Wed, 18 Nov 2015 13:28:57 +0000 (-0800) Subject: C++ convert the global C functions that operate on class CacheDigest X-Git-Tag: SQUID_4_0_3~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=efff174a4d76c50763a9ec426d6372112fed39ca;p=thirdparty%2Fsquid.git C++ convert the global C functions that operate on class CacheDigest This is largely a symbol renaming change. But there are two relatively small logic changes: 1) convert the class to MEMPROXY_CLASS. Which alters the pool creation timing from general memory pool initialization time, to whenever the CacheDigest object is first used. A nice side effect is removal the macro conditional within the old pool type enumeration. Macros like that in enumeration lists such as this one have been causing some builds to have run-time errors accessing memory arrays out-of-bounds or incorrect postions when the build-time dependency detection issues caused build objects to link with different ./configure'd versions. 2) Constructor logic sequence alteration. The old *Create function used to set some members then call the *Init function which would re-set some of them, and initialize most of the rest (but not all). The old *UpdateCap function would call a helper that emulated safe_free(mask) then *Init to alter the objects mask related members whether they needed it or not. The class constructor now initializes all members via initialization list then calls updateCapacity(), which calls a simplified init(). This altered sequence contains the same operational acts while the new order avoids repeated or unnecesarily setting members on create and update. --- efff174a4d76c50763a9ec426d6372112fed39ca