diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2010-07-09 19:51:19 +0200 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2010-07-09 19:51:19 +0200 |
commit | 7635093c1c015e385a9e72bdd8a089fd9d48ab57 (patch) | |
tree | 6d6e0ce5f09b20ee191b66da12f7bf2667c679d1 /apt-pkg/pkgcachegen.h | |
parent | dcdf1ef18b37c243fc707869149f7761d964915c (diff) |
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
Diffstat (limited to 'apt-pkg/pkgcachegen.h')
-rw-r--r-- | apt-pkg/pkgcachegen.h | 12 |
1 files changed, 5 insertions, 7 deletions
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 <apt-pkg/pkgcache.h> #include <apt-pkg/md5.h> -#include <set> +#include <vector> class pkgSourceList; class OpProgress; @@ -46,16 +46,14 @@ class pkgCacheGenerator /*{{{*/ friend class ListParser; template<typename Iter> class Dynamic { - Iter *I; - public: - static std::set<Iter*> toReMap; - Dynamic(Iter &It) : I(&It) { - toReMap.insert(I); + static std::vector<Iter*> toReMap; + Dynamic(Iter &I) { + toReMap.push_back(&I); } ~Dynamic() { - toReMap.erase(I); + toReMap.pop_back(); } }; |