]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Reworked all clients of Stack to std::stack
authorFrancesco Chemolli <kinkie@squid-cache.org>
Tue, 11 Feb 2014 12:05:47 +0000 (13:05 +0100)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Tue, 11 Feb 2014 12:05:47 +0000 (13:05 +0100)
src/Generic.h
src/store.cc

index e82b7fa7e39020947ddbd44da7d74b2a6b710aee..1d4ddab8d9ea44b316ea51b97ca85e67f8e11e15 100644 (file)
@@ -60,18 +60,6 @@ T& for_each(dlink_list const &collection, T& visitor)
     return visitor;
 }
 
-template <class S>
-class Stack;
-
-template <class E, class T>
-T& for_each(Stack<E> const &collection, T& visitor)
-{
-    for (size_t index = 0; index < collection.count; ++index)
-        visitor(*(typename T::argument_type const *)collection.items[index]);
-
-    return visitor;
-};
-
 /* RBC 20030718 - use this to provide instance expecting classes a pointer to a
  * singleton
  */
index 6a75aef627a31bcaf372cd8edc322a6a9a20410f..dc12c284775747633bb1a992fb6495b0e067ce68 100644 (file)
@@ -51,7 +51,6 @@
 #include "RequestFlags.h"
 #include "SquidConfig.h"
 #include "SquidTime.h"
-#include "Stack.h"
 #include "StatCounters.h"
 #include "stmem.h"
 #include "Store.h"
@@ -74,6 +73,8 @@
 #include <limits.h>
 #endif
 
+#include <stack>
+
 #define REBUILD_TIMESTAMP_DELTA_MAX 2
 
 #define STORE_IN_MEM_BUCKETS            (229)
@@ -125,7 +126,7 @@ static EVH storeLateRelease;
 /*
  * local variables
  */
-static Stack<StoreEntry*> LateReleaseStack;
+static std::stack<StoreEntry*> LateReleaseStack;
 MemAllocator *StoreEntry::pool = NULL;
 
 StorePointer Store::CurrentRoot = NULL;