]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Remove dead code from HttpHdrSc.cc
authorFrancesco Chemolli <kinkie@squid-cache.org>
Sun, 2 Aug 2015 19:40:58 +0000 (21:40 +0200)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Sun, 2 Aug 2015 19:40:58 +0000 (21:40 +0200)
src/HttpHdrSc.cc

index b8ea350165dcd3fe2385eb084bb619dab03e5c12..e0a136d623f9241f86505391ada8b0ef602bfe8a 100644 (file)
 #include <map>
 #include <vector>
 
-/* 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<http_hdr_sc_type>::Record ScAttrs[] {
 LookupTable<http_hdr_sc_type> scLookupTable(SC_ENUM_END, ScAttrs);
 std::vector<HttpHeaderFieldStat> 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<int>(aHeader);
+    aHeader = static_cast<http_hdr_sc_type>(++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)
 {