From: Francesco Chemolli Date: Tue, 11 Feb 2014 12:05:47 +0000 (+0100) Subject: Reworked all clients of Stack to std::stack X-Git-Tag: SQUID_3_5_0_1~375^2~3 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=06e91875bd999dd8bbeb1360dd480af79107793f;p=thirdparty%2Fsquid.git Reworked all clients of Stack to std::stack --- diff --git a/src/Generic.h b/src/Generic.h index e82b7fa7e3..1d4ddab8d9 100644 --- a/src/Generic.h +++ b/src/Generic.h @@ -60,18 +60,6 @@ T& for_each(dlink_list const &collection, T& visitor) return visitor; } -template -class Stack; - -template -T& for_each(Stack 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 */ diff --git a/src/store.cc b/src/store.cc index 6a75aef627..dc12c28477 100644 --- a/src/store.cc +++ b/src/store.cc @@ -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 #endif +#include + #define REBUILD_TIMESTAMP_DELTA_MAX 2 #define STORE_IN_MEM_BUCKETS (229) @@ -125,7 +126,7 @@ static EVH storeLateRelease; /* * local variables */ -static Stack LateReleaseStack; +static std::stack LateReleaseStack; MemAllocator *StoreEntry::pool = NULL; StorePointer Store::CurrentRoot = NULL;