Re: /bzr/squid3/trunk/ r12649: Shuffle the traffic mode flags into their own structure

From: Alex Rousskov <rousskov_at_measurement-factory.com>
Date: Mon, 04 Feb 2013 09:09:56 -0700

On 02/04/2013 04:12 AM, Amos Jeffries wrote:

> + TrafficMode(const TrafficMode &rhs) { operator =(rhs); }
> + TrafficMode &operator =(const TrafficMode &rhs) { memcpy(this, &rhs, sizeof(TrafficMode)); return *this; }

Please remove these -- the compiler-generated ones will work just fine
(and possibly better). And if you add these, then you have to add an
explicit destructor as well.

> === added file 'src/anyp/TrafficMode.h'
> --- a/src/anyp/TrafficMode.h 1970-01-01 00:00:00 +0000
> +++ b/src/anyp/TrafficMode.h 2013-02-04 09:47:50 +0000
> @@ -0,0 +1,70 @@
> +#ifndef SQUID_ANYP_TRAFFIC_MODE_H
> +#define SQUID_ANYP_TRAFFIC_MODE_H
> +
> +namespace AnyP

IMO, this should not be placed in AnyP because it is not some basic code
common to many protocols (e.g., URL or base64 encoding). Traffic mode is
higher-level code not directly related to any protocol support. If we
place this code in AnyP, most of Squid will have to be moved there :-).
The "P[rotocol]" in "AnyP" is important.

Thank you,

Alex.
Received on Mon Feb 04 2013 - 16:10:04 MST

This archive was generated by hypermail 2.2.0 : Tue Feb 05 2013 - 12:00:05 MST