From: Francesco Chemolli Date: Mon, 31 Jan 2011 14:06:44 +0000 (+0100) Subject: Some functions needlessly return const int. De-const-ified. X-Git-Tag: take03^2~45 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=881c473386931a374df3090ddf2c70d6bccfe103;p=thirdparty%2Fsquid.git Some functions needlessly return const int. De-const-ified. --- diff --git a/src/Debug.h b/src/Debug.h index 6e5b90d412..c9f1fce3f0 100644 --- a/src/Debug.h +++ b/src/Debug.h @@ -100,7 +100,7 @@ private: extern FILE *debug_log; -const size_t BuildPrefixInit(); +size_t BuildPrefixInit(); const char * SkipBuildPrefix(const char* path); /* Debug stream */ diff --git a/src/HelperChildConfig.cc b/src/HelperChildConfig.cc index 09dd5a167e..69f0b3b640 100644 --- a/src/HelperChildConfig.cc +++ b/src/HelperChildConfig.cc @@ -23,7 +23,7 @@ HelperChildConfig::operator =(const HelperChildConfig &rhs) return *this; } -const int +int HelperChildConfig::needNew() const { /* during the startup and reconfigure use our special amount... */ diff --git a/src/HelperChildConfig.h b/src/HelperChildConfig.h index 07af956db8..06c507fd93 100644 --- a/src/HelperChildConfig.h +++ b/src/HelperChildConfig.h @@ -21,7 +21,7 @@ public: * \retval N < 0 Error. No more helpers may be started. * \retval N N more helpers may be started immediately. */ - const int needNew() const; + int needNew() const; void parseConfig(); /* values from squid.conf */ diff --git a/src/debug.cc b/src/debug.cc index ba79fb8862..f6e6b50471 100644 --- a/src/debug.cc +++ b/src/debug.cc @@ -782,7 +782,7 @@ Debug::xassert(const char *msg, const char *file, int line) std::ostringstream (*Debug::CurrentDebug)(NULL); -const size_t +size_t BuildPrefixInit() { // XXX: This must be kept in sync with the actual debug.cc location diff --git a/src/ip/Address.cc b/src/ip/Address.cc index bf53eae57f..bfee806452 100644 --- a/src/ip/Address.cc +++ b/src/ip/Address.cc @@ -116,7 +116,7 @@ Ip::Address::GetCIDR() const return len; } -const int +int Ip::Address::ApplyMask(Ip::Address const &mask_addr) { uint32_t *p1 = (uint32_t*)(&m_SocketAddr.sin6_addr); diff --git a/src/ip/Address.h b/src/ip/Address.h index 55254522c6..3665de5008 100644 --- a/src/ip/Address.h +++ b/src/ip/Address.h @@ -228,7 +228,7 @@ public: /** Apply a mask to the stored address. \param mask Netmask format to be bit-mask-AND'd over the stored address. */ - const int ApplyMask(const Address &mask); + int ApplyMask(const Address &mask); /** Apply a mask to the stored address. * CIDR will be converted appropriate to map the stored content. diff --git a/src/tests/stub_HelperChildConfig.cc b/src/tests/stub_HelperChildConfig.cc index adb10851cc..6c2eb1bc03 100644 --- a/src/tests/stub_HelperChildConfig.cc +++ b/src/tests/stub_HelperChildConfig.cc @@ -23,7 +23,7 @@ HelperChildConfig::operator =(const HelperChildConfig &rhs) return *this; } -const int +int HelperChildConfig::needNew() const { /* during the startup and reconfigure use our special amount... */