From: Francesco Chemolli Date: Sat, 12 Apr 2014 07:17:08 +0000 (+0200) Subject: Formatting fixes, const-ified a SBuf X-Git-Tag: SQUID_3_5_0_1~295^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=519bae94f69e0dc7a55fe7ebec95ca5ceb50a9fe;p=thirdparty%2Fsquid.git Formatting fixes, const-ified a SBuf --- diff --git a/src/acl/HttpStatus.cc b/src/acl/HttpStatus.cc index 72fc9d8b9c..df39dedfc0 100644 --- a/src/acl/HttpStatus.cc +++ b/src/acl/HttpStatus.cc @@ -71,9 +71,8 @@ int acl_httpstatus_data::compare(acl_httpstatus_data* const& a, acl_httpstatus_d ret = aclHTTPStatusCompare(a, b); if (ret == 0) { - SBuf sa, sb; - sa=a->repr(); - sb=b->repr(); + const SBuf sa = a->repr(); + const SBuf sb = b->repr(); debugs(28, DBG_CRITICAL, "WARNING: '" << sa << "' is a subrange of '" << sb << "'"); debugs(28, DBG_CRITICAL, "WARNING: because of this '" << sa << "' is ignored to keep splay tree searching predictable"); debugs(28, DBG_CRITICAL, "WARNING: You should probably remove '" << sb << "' from the ACL named '" << AclMatchedName << "'"); diff --git a/src/acl/IntRange.cc b/src/acl/IntRange.cc index 871a1da080..30d5ee39f4 100644 --- a/src/acl/IntRange.cc +++ b/src/acl/IntRange.cc @@ -108,11 +108,11 @@ ACLIntRange::clone() const return new ACLIntRange (*this); } -ACLIntRange::~ACLIntRange () +ACLIntRange::~ACLIntRange() {} SBufList -ACLIntRange::dump () +ACLIntRange::dump() { SBufList sl; CbDataListIterator iter(ranges); diff --git a/src/acl/Ip.cc b/src/acl/Ip.cc index 64960b8bd9..7a15356312 100644 --- a/src/acl/Ip.cc +++ b/src/acl/Ip.cc @@ -532,12 +532,12 @@ SBufList ACLIP::dump() const { SBufList sl; - data->walk (DumpIpListWalkee, &sl); + data->walk(DumpIpListWalkee, &sl); return sl; } bool -ACLIP::empty () const +ACLIP::empty() const { return data->empty(); } @@ -561,6 +561,6 @@ ACLIP::match(Ip::Address &clientip) return !splayLastResult; } -acl_ip_data::acl_ip_data () :addr1(), addr2(), mask(), next (NULL) {} +acl_ip_data::acl_ip_data() :addr1(), addr2(), mask(), next (NULL) {} -acl_ip_data::acl_ip_data (Ip::Address const &anAddress1, Ip::Address const &anAddress2, Ip::Address const &aMask, acl_ip_data *aNext) : addr1(anAddress1), addr2(anAddress2), mask(aMask), next(aNext) {} +acl_ip_data::acl_ip_data(Ip::Address const &anAddress1, Ip::Address const &anAddress2, Ip::Address const &aMask, acl_ip_data *aNext) : addr1(anAddress1), addr2(anAddress2), mask(aMask), next(aNext) {} diff --git a/src/acl/StringData.cc b/src/acl/StringData.cc index 60dbb544d2..25bd55b228 100644 --- a/src/acl/StringData.cc +++ b/src/acl/StringData.cc @@ -37,7 +37,6 @@ #include "acl/StringData.h" #include "cache_cf.h" #include "Debug.h" -#include "wordlist.h" ACLStringData::ACLStringData() : values (NULL) {} @@ -99,7 +98,7 @@ ACLStringData::dump() { SBufList sl; /* damn this is VERY inefficient for long ACL lists... filling - * a wordlist this way costs Sum(1,N) iterations. For instance + * a SBufList this way costs Sum(1,N) iterations. For instance * a 1000-elements list will be filled in 499500 iterations. */ values->walk(aclDumpStringWalkee, &sl); diff --git a/src/acl/UserData.cc b/src/acl/UserData.cc index 08af4ee6c2..62b8cb08ce 100644 --- a/src/acl/UserData.cc +++ b/src/acl/UserData.cc @@ -37,7 +37,6 @@ #include "acl/UserData.h" #include "ConfigParser.h" #include "Debug.h" -#include "wordlist.h" template inline void @@ -110,7 +109,7 @@ ACLUserData::dump() sl.push_back(SBuf("-i")); /* damn this is VERY inefficient for long ACL lists... filling - * a wordlist this way costs Sum(1,N) iterations. For instance + * a SBufList this way costs Sum(1,N) iterations. For instance * a 1000-elements list will be filled in 499500 iterations. */ if (flags.required)