]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/HttpHdrCc.cc
Source Format Enforcement (#1234)
[thirdparty/squid.git] / src / HttpHdrCc.cc
index 97b73574ded2b0ae6664637ce5052d82b23950d3..b95b133e615c330e5c1ab6783d286763df17c4c3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1996-2019 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
  *
  * Squid software is distributed under GPLv2+ license and includes
  * contributions from numerous individuals and organizations.
@@ -48,7 +48,8 @@ LookupTable<HttpHdrCcType> ccLookupTable(HttpHdrCcType::CC_OTHER,CcAttrs);
 std::vector<HttpHeaderFieldStat> ccHeaderStats(HttpHdrCcType::CC_ENUM_END);
 
 /// used to walk a table of http_header_cc_type structs
-HttpHdrCcType &operator++ (HttpHdrCcType &aHeader)
+static HttpHdrCcType &
+operator++ (HttpHdrCcType &aHeader)
 {
     int tmp = (int)aHeader;
     aHeader = (HttpHdrCcType)(++tmp);
@@ -61,7 +62,7 @@ httpHdrCcInitModule(void)
 {
     // check invariant on initialization table
     for (unsigned int j = 0; CcAttrs[j].name != nullptr; ++j) {
-        assert (static_cast<int>(CcAttrs[j].id) == j);
+        assert(static_cast<decltype(j)>(CcAttrs[j].id) == j);
     }
 }
 
@@ -95,7 +96,7 @@ HttpHdrCc::parse(const String & str)
 {
     const char *item;
     const char *p;      /* '=' parameter */
-    const char *pos = NULL;
+    const char *pos = nullptr;
     int ilen;
     int nlen;