From: hno <> Date: Mon, 9 May 2005 04:35:03 +0000 (+0000) Subject: Refactor splay tree empty check by ->empty() method (again). X-Git-Tag: SQUID_3_0_PRE4~771 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=290eb6b9b47161f5c8e82ddec76d47ff60d67b54;p=thirdparty%2Fsquid.git Refactor splay tree empty check by ->empty() method (again). --- diff --git a/include/splay.h b/include/splay.h index 49100d7d89..cca55b3331 100644 --- a/include/splay.h +++ b/include/splay.h @@ -1,5 +1,5 @@ /* - * $Id: splay.h,v 1.28 2005/01/06 13:16:38 serassio Exp $ + * $Id: splay.h,v 1.29 2005/05/08 22:35:03 hno Exp $ */ #ifndef SQUID_SPLAY_H @@ -28,6 +28,7 @@ public: mutable SplayNode *right; void destroy(SPLAYFREE *); void walk(SPLAYWALKEE *, void *callerState); + bool empty() const { return this == NULL; } SplayNode const * start() const; SplayNode const * finish() const; diff --git a/src/ACLARP.cc b/src/ACLARP.cc index aea067bab3..275331c835 100644 --- a/src/ACLARP.cc +++ b/src/ACLARP.cc @@ -1,5 +1,5 @@ /* - * $Id: ACLARP.cc,v 1.17 2005/05/08 09:58:05 serassio Exp $ + * $Id: ACLARP.cc,v 1.18 2005/05/08 22:35:03 hno Exp $ * * DEBUG: section 28 Access Control * AUTHOR: Duane Wessels @@ -120,7 +120,7 @@ ACLARP::typeString() const bool ACLARP::empty () const { - return data == NULL; + return data->empty(); } /* ==== BEGIN ARP ACL SUPPORT ============================================= */ diff --git a/src/ACLDomainData.cc b/src/ACLDomainData.cc index 55a0f2ea7c..8fac5b5e52 100644 --- a/src/ACLDomainData.cc +++ b/src/ACLDomainData.cc @@ -1,5 +1,5 @@ /* - * $Id: ACLDomainData.cc,v 1.10 2005/05/08 06:36:45 hno Exp $ + * $Id: ACLDomainData.cc,v 1.11 2005/05/08 22:35:03 hno Exp $ * * DEBUG: section 28 Access Control * AUTHOR: Duane Wessels @@ -156,7 +156,7 @@ ACLDomainData::parse() bool ACLDomainData::empty() const { - return domains == NULL; + return domains->empty(); } diff --git a/src/ACLIP.cc b/src/ACLIP.cc index 3ca6fc7585..0d3a5c856f 100644 --- a/src/ACLIP.cc +++ b/src/ACLIP.cc @@ -355,7 +355,7 @@ ACLIP::dump() const bool ACLIP::empty () const { - return data == NULL; + return data->empty(); } int diff --git a/src/ACLStringData.cc b/src/ACLStringData.cc index eeada44053..f704fe5a13 100644 --- a/src/ACLStringData.cc +++ b/src/ACLStringData.cc @@ -1,5 +1,5 @@ /* - * $Id: ACLStringData.cc,v 1.6 2005/05/08 06:36:45 hno Exp $ + * $Id: ACLStringData.cc,v 1.7 2005/05/08 22:35:03 hno Exp $ * * DEBUG: section 28 Access Control * AUTHOR: Duane Wessels @@ -113,7 +113,7 @@ ACLStringData::parse() bool ACLStringData::empty() const { - return values == NULL; + return values->empty(); } ACLData * diff --git a/src/ACLUserData.cc b/src/ACLUserData.cc index 69112e1c99..e14aa525cd 100644 --- a/src/ACLUserData.cc +++ b/src/ACLUserData.cc @@ -166,7 +166,7 @@ ACLUserData::parse() bool ACLUserData::empty() const { - return ((names == NULL) && (flags.required != 1)); + return names->empty() && !flags.required; } ACLData *