]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Removed now useless assertions
authorFrancesco Chemolli <kinkie@squid-cache.org>
Fri, 2 Jan 2015 10:08:20 +0000 (11:08 +0100)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Fri, 2 Jan 2015 10:08:20 +0000 (11:08 +0100)
include/splay.h

index d6bfe3ebabf6ae279904f26307f4d8634366c125..4f5455e6bc2eecf070cb38a52c39503d83dc1c4f 100644 (file)
@@ -105,9 +105,6 @@ template<class V>
 void
 SplayNode<V>::walk(SPLAYWALKEE * walkee, void *state)
 {
-    if (this == NULL)
-        return;
-
     if (left)
         left->walk(walkee, state);
 
@@ -141,9 +138,6 @@ template<class V>
 void
 SplayNode<V>::destroy(SPLAYFREE * free_func)
 {
-    if (!this)
-        return;
-
     if (left)
         left->destroy(free_func);
 
@@ -159,8 +153,6 @@ template<class V>
 SplayNode<V> *
 SplayNode<V>::remove(Value const dataToRemove, SPLAYCMP * compare)
 {
-    assert(this != NULL);
-
     SplayNode<V> *result = splay(dataToRemove, compare);
 
     if (splayLastResult == 0) { /* found it */
@@ -188,9 +180,6 @@ SplayNode<V>::insert(Value dataToInsert, SPLAYCMP * compare)
 {
     /* create node to insert */
     SplayNode<V> *newNode = new SplayNode<V>(dataToInsert);
-
-    assert(this != NULL);
-
     SplayNode<V> *newTop = splay(dataToInsert, compare);
 
     if (splayLastResult < 0) {
@@ -215,8 +204,6 @@ template<class FindValue>
 SplayNode<V> *
 SplayNode<V>::splay(FindValue const &dataToFind, int( * compare)(FindValue const &a, Value const &b)) const
 {
-    assert(this != NULL);
-
     Value temp = Value();
     SplayNode<V> N(temp);
     SplayNode<V> *l;