On Tue, 13 Sep 2011 10:11:55 -0600, Alex Rousskov wrote: <snip>
void +HttpHdrCc::clear() +{ + mask=0; + max_age=-1; + mask=0; + max_age=-1; + s_maxage=-1; + max_stale=-1; + stale_if_error=0; + min_fresh=-1; + other.clean(); +}This duplicates the default constructor. Mask and max_age are cleared twice. Consider this implementation instead (which can be inlined): *this = HttpHdrCc();
Nice.We use ~Foo(){clear();} in quite a few places. Do you have any info which is faster?
Amos
