]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/pkgcachegen.h
merged from lp:~donkult/apt/sid
[apt.git] / apt-pkg / pkgcachegen.h
index 20dd28030e4e03539573f82216f5a41645fe6ad4..c260511826ab36dc94472aedc3b66d713d982712 100644 (file)
@@ -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();
       }
    };
 
@@ -77,7 +75,7 @@ class pkgCacheGenerator                                                       /*{{{*/
    bool NewFileDesc(pkgCache::DescIterator &Desc,ListParser &List);
    bool NewDepends(pkgCache::PkgIterator &Pkg, pkgCache::VerIterator &Ver,
                   string const &Version, unsigned int const &Op,
-                  unsigned int const &Type, map_ptrloc *OldDepLast);
+                  unsigned int const &Type, map_ptrloc* &OldDepLast);
    unsigned long NewVersion(pkgCache::VerIterator &Ver,const string &VerStr,unsigned long Next);
    map_ptrloc NewDescription(pkgCache::DescIterator &Desc,const string &Lang,const MD5SumValue &md5sum,map_ptrloc Next);