From: Francesco Chemolli Date: Sun, 2 Aug 2015 19:40:58 +0000 (+0200) Subject: Remove dead code from HttpHdrSc.cc X-Git-Tag: merge-candidate-3-v1~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a9cfbb8395e9aabf7fe53a8de604800dcbfab67c;p=thirdparty%2Fsquid.git Remove dead code from HttpHdrSc.cc --- diff --git a/src/HttpHdrSc.cc b/src/HttpHdrSc.cc index b8ea350165..e0a136d623 100644 --- a/src/HttpHdrSc.cc +++ b/src/HttpHdrSc.cc @@ -22,13 +22,6 @@ #include #include -/* a row in the table used for parsing surrogate-control header and statistics */ -typedef struct { - const char *name; - http_hdr_sc_type id; - HttpHeaderFieldStat stat; -} HttpHeaderScFields; - /* this table is used for parsing surrogate control header */ /* order must match that of enum http_hdr_sc_type. The constraint is verified at initialization time */ //todo: implement constraint @@ -43,20 +36,14 @@ static const LookupTable::Record ScAttrs[] { LookupTable scLookupTable(SC_ENUM_END, ScAttrs); std::vector scHeaderStats(SC_ENUM_END); +// used when iterating over flags http_hdr_sc_type &operator++ (http_hdr_sc_type &aHeader) { - int tmp = (int)aHeader; - aHeader = (http_hdr_sc_type)(++tmp); + int tmp = static_cast(aHeader); + aHeader = static_cast(++tmp); return aHeader; } -int operator - (http_hdr_sc_type const &anSc, http_hdr_sc_type const &anSc2) -{ - return (int)anSc - (int)anSc2; -} - -/* module initialization */ - void httpHdrScInitModule(void) {