summaryrefslogtreecommitdiff
path: root/apt-pkg/pkgcache.cc
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:57:57 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:57:57 +0000
commit851a45a85fa486abc642e10f19afef11f621c29d (patch)
tree4422363bbe6e4bf3fc5f9ca8f9efcfe9ec79f0b9 /apt-pkg/pkgcache.cc
parent422d9f6e1887b3adbb2a8e6798c61390079a0965 (diff)
G++3 fixes from Randolph
Author: jgg Date: 2001-05-14 05:47:30 GMT G++3 fixes from Randolph
Diffstat (limited to 'apt-pkg/pkgcache.cc')
-rw-r--r--apt-pkg/pkgcache.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc
index fa231ef37..d0a86ec69 100644
--- a/apt-pkg/pkgcache.cc
+++ b/apt-pkg/pkgcache.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: pkgcache.cc,v 1.34 2001/04/29 05:13:51 jgg Exp $
+// $Id: pkgcache.cc,v 1.35 2001/05/14 05:54:10 jgg Exp $
/* ######################################################################
Package Cache - Accessor code for the cache
@@ -37,10 +37,12 @@
#include <sys/stat.h>
#include <unistd.h>
+#include <ctype.h>
#include <system.h>
-
/*}}}*/
+using std::string;
+
// Cache::Header::Header - Constructor /*{{{*/
// ---------------------------------------------------------------------
/* Simply initialize the header */
@@ -154,7 +156,7 @@ bool pkgCache::ReMap()
unsigned long pkgCache::sHash(string Str) const
{
unsigned long Hash = 0;
- for (const char *I = Str.begin(); I != Str.end(); I++)
+ for (string::const_iterator I = Str.begin(); I != Str.end(); I++)
Hash = 5*Hash + tolower(*I);
return Hash % _count(HeaderP->HashTable);
}
@@ -178,7 +180,7 @@ pkgCache::PkgIterator pkgCache::FindPkg(string Name)
for (; Pkg != PkgP; Pkg = PkgP + Pkg->NextPackage)
{
if (Pkg->Name != 0 && StrP[Pkg->Name] == Name[0] &&
- stringcasecmp(Name.begin(),Name.end(),StrP + Pkg->Name) == 0)
+ stringcasecmp(Name,StrP + Pkg->Name) == 0)
return PkgIterator(*this,Pkg);
}
return PkgIterator(*this,0);