]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/algorithms.h
lots of cppcheck fixes
[apt.git] / apt-pkg / algorithms.h
index cee30b679f3509d00611593eac0c062b5731ab7d..99501bed1e5dcb945b2b265607069478bc439c12 100644 (file)
@@ -48,7 +48,7 @@ class pkgSimulate : public pkgPackageManager                          /*{{{*/
       pkgDepCache *Cache;
       public:
       
-      virtual VerIterator GetCandidateVer(PkgIterator Pkg)
+      virtual VerIterator GetCandidateVer(PkgIterator const &Pkg)
       {
         return (*Cache)[Pkg].CandidateVerIter(*Cache);
       }
@@ -106,9 +106,12 @@ class pkgProblemResolver                                           /*{{{*/
    void MakeScores();
    bool DoUpgrade(pkgCache::PkgIterator Pkg);
    
+   protected:
+   bool InstOrNewPolicyBroken(pkgCache::PkgIterator Pkg);
+
    public:
    
-   inline void Protect(pkgCache::PkgIterator Pkg) {Flags[Pkg->ID] |= Protected;};
+   inline void Protect(pkgCache::PkgIterator Pkg) {Flags[Pkg->ID] |= Protected; Cache.MarkProtected(Pkg);};
    inline void Remove(pkgCache::PkgIterator Pkg) {Flags[Pkg->ID] |= ToRemove;};
    inline void Clear(pkgCache::PkgIterator Pkg) {Flags[Pkg->ID] &= ~(Protected | ToRemove);};