From 171c75f13acc955110a6c4693c7b8fe243709843 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 23 Nov 2005 00:00:13 +0000 Subject: * applied parts of the string speedup patch from debian #319377 (ABI change) --- apt-pkg/pkgcache.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'apt-pkg/pkgcache.h') diff --git a/apt-pkg/pkgcache.h b/apt-pkg/pkgcache.h index b07951dfb..587d97534 100644 --- a/apt-pkg/pkgcache.h +++ b/apt-pkg/pkgcache.h @@ -89,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: @@ -111,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(); -- cgit v1.2.3