X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/b2e465d6d32d2dc884f58b94acb7e35f671a87fe..a4decc40b3eb085ea994d2a8b31ee9cddfd570ff:/apt-pkg/pkgcache.h diff --git a/apt-pkg/pkgcache.h b/apt-pkg/pkgcache.h index f2b1c39fa..587d97534 100644 --- a/apt-pkg/pkgcache.h +++ b/apt-pkg/pkgcache.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: pkgcache.h,v 1.23 2001/02/20 07:03:17 jgg Exp $ +// $Id: pkgcache.h,v 1.25 2001/07/01 22:28:24 jgg Exp $ /* ###################################################################### Cache - Structure definitions for the cache file @@ -26,6 +26,8 @@ #include #include #include + +using std::string; class pkgVersioningSystem; class pkgCache @@ -87,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: @@ -109,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(); @@ -259,9 +261,9 @@ struct pkgCache::Dependency map_ptrloc ParentVer; // Version // Specific types of depends + map_ptrloc ID; unsigned char Type; unsigned char CompareOp; - unsigned short ID; }; struct pkgCache::Provides