X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/254ce4b0cc0336de5a9b46c693673ef68d5628b6..aac2e51078714d5130861035e9b3b5d4d6b84471:/apt-pkg/pkgcache.h?ds=sidebyside diff --git a/apt-pkg/pkgcache.h b/apt-pkg/pkgcache.h index 083f20ac2..587d97534 100644 --- a/apt-pkg/pkgcache.h +++ b/apt-pkg/pkgcache.h @@ -75,7 +75,6 @@ class pkgCache enum PkgInstState {Ok=0,ReInstReq=1,HoldInst=2,HoldReInstReq=3}; enum PkgCurrentState {NotInstalled=0,UnPacked=1,HalfConfigured=2, HalfInstalled=4,ConfigFiles=5,Installed=6}; - enum PkgRemoveState {RemoveUnknown=0, RemoveManual=1,RemoveSuggested=2,RemoveRecommended=3,RemoveRequired=4}; }; struct Flag @@ -90,7 +89,7 @@ class pkgCache string CacheFile; MMap ⤅ - unsigned long sHash(string S) const; + unsigned long sHash(const string &S) const; unsigned long sHash(const char *S) const; public: @@ -112,14 +111,14 @@ class pkgCache inline void *DataEnd() {return ((unsigned char *)Map.Data()) + Map.Size();}; // String hashing function (512 range) - inline unsigned long Hash(string S) const {return sHash(S);}; + inline unsigned long Hash(const string &S) const {return sHash(S);}; inline unsigned long Hash(const char *S) const {return sHash(S);}; // Usefull transformation things const char *Priority(unsigned char Priority); // Accessors - PkgIterator FindPkg(string Name); + PkgIterator FindPkg(const string &Name); Header &Head() {return *HeaderP;}; inline PkgIterator PkgBegin(); inline PkgIterator PkgEnd();