From 851a45a85fa486abc642e10f19afef11f621c29d Mon Sep 17 00:00:00 2001 From: Arch Librarian Date: Mon, 20 Sep 2004 16:57:57 +0000 Subject: G++3 fixes from Randolph Author: jgg Date: 2001-05-14 05:47:30 GMT G++3 fixes from Randolph --- apt-pkg/pkgcache.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'apt-pkg/pkgcache.cc') 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 #include +#include #include - /*}}}*/ +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); -- cgit v1.2.3