]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Refactor splay tree empty check by ->empty() method (again).
authorhno <>
Mon, 9 May 2005 04:35:03 +0000 (04:35 +0000)
committerhno <>
Mon, 9 May 2005 04:35:03 +0000 (04:35 +0000)
include/splay.h
src/ACLARP.cc
src/ACLDomainData.cc
src/ACLIP.cc
src/ACLStringData.cc
src/ACLUserData.cc

index 49100d7d89bf87840b3620dc9cb5075ae8c631bd..cca55b33317bc56aff2ac5afeb4c1aa05a1fdd90 100644 (file)
@@ -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<V> *right;
     void destroy(SPLAYFREE *);
     void walk(SPLAYWALKEE *, void *callerState);
+    bool empty() const { return this == NULL; }
     SplayNode<V> const * start() const;
     SplayNode<V> const * finish() const;
 
index aea067bab369c1bf3ff6524c829ef0923f268605..275331c8351b750fac7d530f7b973cf0e6dda0a7 100644 (file)
@@ -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 ============================================= */
index 55a0f2ea7c24c18ef2884d1435a2f26654b913a1..8fac5b5e52ed2ef03688cb5a111798c3ef825fa9 100644 (file)
@@ -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();
 }
 
 
index 3ca6fc758530fb5754836c16dd5c57c28237df2f..0d3a5c856fdf7eb6a8fbd148989279f46252aa88 100644 (file)
@@ -355,7 +355,7 @@ ACLIP::dump() const
 bool
 ACLIP::empty () const
 {
-    return data == NULL;
+    return data->empty();
 }
 
 int
index eeada440536f41f781307392dcfe38df94fcca12..f704fe5a13cb9a23281c4a3258952feade93b2ea 100644 (file)
@@ -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<char const *> *
index 69112e1c99ff1f3674df7daa56c228640b292efa..e14aa525cdaae8fd9762e8840cada2149d1248c9 100644 (file)
@@ -166,7 +166,7 @@ ACLUserData::parse()
 bool
 ACLUserData::empty() const
 {
-    return ((names == NULL) && (flags.required != 1));
+    return names->empty() && !flags.required;
 }
 
 ACLData<char const *> *