From 7635093c1c015e385a9e72bdd8a089fd9d48ab57 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 9 Jul 2010 19:51:19 +0200 Subject: switch from std::set to std::vector as it is way more simple, a bit faster and still provides everything we need for the Cache generator --- apt-pkg/pkgcachegen.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'apt-pkg/pkgcachegen.h') diff --git a/apt-pkg/pkgcachegen.h b/apt-pkg/pkgcachegen.h index 20dd28030..ff198833a 100644 --- a/apt-pkg/pkgcachegen.h +++ b/apt-pkg/pkgcachegen.h @@ -23,7 +23,7 @@ #include #include -#include +#include class pkgSourceList; class OpProgress; @@ -46,16 +46,14 @@ class pkgCacheGenerator /*{{{*/ friend class ListParser; template class Dynamic { - Iter *I; - public: - static std::set toReMap; - Dynamic(Iter &It) : I(&It) { - toReMap.insert(I); + static std::vector toReMap; + Dynamic(Iter &I) { + toReMap.push_back(&I); } ~Dynamic() { - toReMap.erase(I); + toReMap.pop_back(); } }; -- cgit v1.2.3