From: Amos Jeffries Date: Fri, 27 May 2011 13:52:35 +0000 (-0600) Subject: Optimize: inline several Ip::Address methods X-Git-Tag: take08~55^2~170 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=3cbeddcf8a99211e0153f5fb20c33514c9bb6dd8;p=thirdparty%2Fsquid.git Optimize: inline several Ip::Address methods --- diff --git a/src/SquidConfig.cc b/src/SquidConfig.cc index 970e3b4830..0dc94e2e11 100644 --- a/src/SquidConfig.cc +++ b/src/SquidConfig.cc @@ -3,6 +3,7 @@ */ #include "config.h" +#include "ip/Address.h" // just for the global definition of Config and Config2 #include "structs.h" diff --git a/src/ip/Address.cc b/src/ip/Address.cc index 597ae6586f..420b968928 100644 --- a/src/ip/Address.cc +++ b/src/ip/Address.cc @@ -63,16 +63,6 @@ } printf("\n"); assert(b); \ } -Ip::Address::Address() -{ - SetEmpty(); -} - -Ip::Address::~Address() -{ - memset(this,0,sizeof(Ip::Address)); -} - int Ip::Address::GetCIDR() const { diff --git a/src/ip/Address.h b/src/ip/Address.h index 3665de5008..216385f059 100644 --- a/src/ip/Address.h +++ b/src/ip/Address.h @@ -75,7 +75,7 @@ class Address public: /** @name Constructors and Destructor */ /*@{*/ - Address(); + Address() { SetEmpty(); } Address(const Address &); /** @@ -94,8 +94,7 @@ public: Address(const struct hostent &); Address(const struct addrinfo &); Address(const char*); - /// Default destructor. - ~Address(); + ~Address() {} /*@}*/ /** @name Assignment Operators */