]> git.saurik.com Git - apt.git/commitdiff
rename ReOwn to ReMap in the cacheiterators
authorDavid Kalnischkies <kalnischkies@gmail.com>
Sun, 11 Jul 2010 17:19:35 +0000 (19:19 +0200)
committerDavid Kalnischkies <kalnischkies@gmail.com>
Sun, 11 Jul 2010 17:19:35 +0000 (19:19 +0200)
apt-pkg/cacheiterators.h
apt-pkg/pkgcachegen.cc

index eb8dee5e38e36934b4e1e8fb0c95500bfb72a996..1dcc345329aa3a88922ee657019a039db0ee42f6 100644 (file)
@@ -75,8 +75,8 @@ template<typename Str, typename Itr> class pkgCache::Iterator :
        inline bool IsGood() const { return S && Owner && ! end();};
        inline unsigned long Index() const {return S - OwnerPointer();};
 
-       void ReOwn(pkgCache &newOwner, void const * const oldMap, void const * const newMap) {
-               if (S == 0)
+       void ReMap(void const * const oldMap, void const * const newMap) {
+               if (Owner == 0 || S == 0)
                        return;
                S += (Str*)(newMap) - (Str*)(oldMap);
        }
index 38f2d6a2adb58ba373b6b23db913eee64cf55120..75f2ffe45a7039dabb69d8b0fdef555af1f24299 100644 (file)
@@ -115,25 +115,25 @@ void pkgCacheGenerator::ReMap(void const * const oldMap, void const * const newM
 
    for (std::vector<pkgCache::GrpIterator*>::const_iterator i = Dynamic<pkgCache::GrpIterator>::toReMap.begin();
        i != Dynamic<pkgCache::GrpIterator>::toReMap.end(); ++i)
-      (*i)->ReOwn(Cache, oldMap, newMap);
+      (*i)->ReMap(oldMap, newMap);
    for (std::vector<pkgCache::PkgIterator*>::const_iterator i = Dynamic<pkgCache::PkgIterator>::toReMap.begin();
        i != Dynamic<pkgCache::PkgIterator>::toReMap.end(); ++i)
-      (*i)->ReOwn(Cache, oldMap, newMap);
+      (*i)->ReMap(oldMap, newMap);
    for (std::vector<pkgCache::VerIterator*>::const_iterator i = Dynamic<pkgCache::VerIterator>::toReMap.begin();
        i != Dynamic<pkgCache::VerIterator>::toReMap.end(); ++i)
-      (*i)->ReOwn(Cache, oldMap, newMap);
+      (*i)->ReMap(oldMap, newMap);
    for (std::vector<pkgCache::DepIterator*>::const_iterator i = Dynamic<pkgCache::DepIterator>::toReMap.begin();
        i != Dynamic<pkgCache::DepIterator>::toReMap.end(); ++i)
-      (*i)->ReOwn(Cache, oldMap, newMap);
+      (*i)->ReMap(oldMap, newMap);
    for (std::vector<pkgCache::DescIterator*>::const_iterator i = Dynamic<pkgCache::DescIterator>::toReMap.begin();
        i != Dynamic<pkgCache::DescIterator>::toReMap.end(); ++i)
-      (*i)->ReOwn(Cache, oldMap, newMap);
+      (*i)->ReMap(oldMap, newMap);
    for (std::vector<pkgCache::PrvIterator*>::const_iterator i = Dynamic<pkgCache::PrvIterator>::toReMap.begin();
        i != Dynamic<pkgCache::PrvIterator>::toReMap.end(); ++i)
-      (*i)->ReOwn(Cache, oldMap, newMap);
+      (*i)->ReMap(oldMap, newMap);
    for (std::vector<pkgCache::PkgFileIterator*>::const_iterator i = Dynamic<pkgCache::PkgFileIterator>::toReMap.begin();
        i != Dynamic<pkgCache::PkgFileIterator>::toReMap.end(); ++i)
-      (*i)->ReOwn(Cache, oldMap, newMap);
+      (*i)->ReMap(oldMap, newMap);
 }                                                                      /*}}}*/
 // CacheGenerator::WriteStringInMap                                    /*{{{*/
 map_ptrloc pkgCacheGenerator::WriteStringInMap(const char *String,