From: Francesco Chemolli Date: Fri, 2 Jan 2015 10:08:20 +0000 (+0100) Subject: Removed now useless assertions X-Git-Tag: merge-candidate-3-v1~384^2~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e6709fa0f9d5160328e9bc6de6c1128ae854381a;p=thirdparty%2Fsquid.git Removed now useless assertions --- diff --git a/include/splay.h b/include/splay.h index d6bfe3ebab..4f5455e6bc 100644 --- a/include/splay.h +++ b/include/splay.h @@ -105,9 +105,6 @@ template void SplayNode::walk(SPLAYWALKEE * walkee, void *state) { - if (this == NULL) - return; - if (left) left->walk(walkee, state); @@ -141,9 +138,6 @@ template void SplayNode::destroy(SPLAYFREE * free_func) { - if (!this) - return; - if (left) left->destroy(free_func); @@ -159,8 +153,6 @@ template SplayNode * SplayNode::remove(Value const dataToRemove, SPLAYCMP * compare) { - assert(this != NULL); - SplayNode *result = splay(dataToRemove, compare); if (splayLastResult == 0) { /* found it */ @@ -188,9 +180,6 @@ SplayNode::insert(Value dataToInsert, SPLAYCMP * compare) { /* create node to insert */ SplayNode *newNode = new SplayNode(dataToInsert); - - assert(this != NULL); - SplayNode *newTop = splay(dataToInsert, compare); if (splayLastResult < 0) { @@ -215,8 +204,6 @@ template SplayNode * SplayNode::splay(FindValue const &dataToFind, int( * compare)(FindValue const &a, Value const &b)) const { - assert(this != NULL); - Value temp = Value(); SplayNode N(temp); SplayNode *l;