]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - include/splay.h
SourceFormat Enforcement
[thirdparty/squid.git] / include / splay.h
index eae7380d33f3d8039dd854f06b74f95b4f0b2623..bc3a20746363ec3a9c6b4758acb3e43575f3a6e2 100644 (file)
@@ -169,7 +169,7 @@ SplayNode<V>::remove(Value const dataToRemove, SPLAYCMP * compare)
 
     SplayNode<V> *result = splay(dataToRemove, compare);
 
-    if (splayLastResult == 0) {        /* found it */
+    if (splayLastResult == 0) { /* found it */
         SplayNode<V> *newTop;
 
         if (result->left == NULL) {
@@ -185,7 +185,7 @@ SplayNode<V>::remove(Value const dataToRemove, SPLAYCMP * compare)
         return newTop;
     }
 
-    return result;                     /* It wasn't there */
+    return result;          /* It wasn't there */
 }
 
 template<class V>
@@ -249,7 +249,7 @@ SplayNode<V>::splay(FindValue const &dataToFind, int( * compare)(FindValue const
                 break;
 
             if ((splayLastResult = compare(dataToFind, top->left->data)) < 0) {
-                y = top->left; /* rotate right */
+                y = top->left;  /* rotate right */
                 top->left = y->right;
                 y->right = top;
                 top = y;
@@ -258,7 +258,7 @@ SplayNode<V>::splay(FindValue const &dataToFind, int( * compare)(FindValue const
                     break;
             }
 
-            r->left = top;     /* link right */
+            r->left = top;  /* link right */
             r = top;
             top = top->left;
         } else if (splayLastResult > 0) {
@@ -266,7 +266,7 @@ SplayNode<V>::splay(FindValue const &dataToFind, int( * compare)(FindValue const
                 break;
 
             if ((splayLastResult = compare(dataToFind, top->right->data)) > 0) {
-                y = top->right;        /* rotate left */
+                y = top->right; /* rotate left */
                 top->right = y->left;
                 y->left = top;
                 top = y;
@@ -275,7 +275,7 @@ SplayNode<V>::splay(FindValue const &dataToFind, int( * compare)(FindValue const
                     break;
             }
 
-            l->right = top;    /* link left */
+            l->right = top; /* link left */
             l = top;
             top = top->right;
         } else {
@@ -283,7 +283,7 @@ SplayNode<V>::splay(FindValue const &dataToFind, int( * compare)(FindValue const
         }
     }
 
-    l->right = top->left;      /* assemble */
+    l->right = top->left;   /* assemble */
     r->left = top->right;
     top->left = N.right;
     top->right = N.left;
@@ -516,3 +516,4 @@ SplayConstIterator<V>::operator * () const
 #endif /* cplusplus */
 
 #endif /* SQUID_SPLAY_H */
+