summaryrefslogtreecommitdiff
path: root/apt-pkg/pkgcache.h
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2005-11-23 00:00:13 +0000
committerMichael Vogt <michael.vogt@ubuntu.com>2005-11-23 00:00:13 +0000
commit171c75f13acc955110a6c4693c7b8fe243709843 (patch)
tree5ab08f93a83b026a12cab131061ddf91cbf476f2 /apt-pkg/pkgcache.h
parent7c6e2dc761f736bf203f7770f7a1c4a63f7063d4 (diff)
* applied parts of the string speedup patch from debian #319377 (ABI change)
Diffstat (limited to 'apt-pkg/pkgcache.h')
-rw-r--r--apt-pkg/pkgcache.h6
1 files changed, 3 insertions, 3 deletions
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 &Map;
- 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();