diff options
author | Arch Librarian <arch@canonical.com> | 2004-09-20 16:52:03 +0000 |
---|---|---|
committer | Arch Librarian <arch@canonical.com> | 2004-09-20 16:52:03 +0000 |
commit | c1a2237722820dcd5e387dda5a88085cf62e68b9 (patch) | |
tree | d8767f5498575b70bf6bacdbe962c776f6b84bb2 /apt-pkg/pkgcache.cc | |
parent | f826cfaa1c3f9fcf492fb65b22a2d964e78ae7ec (diff) |
Optimizations
Author: jgg
Date: 1998-12-07 07:26:19 GMT
Optimizations
Diffstat (limited to 'apt-pkg/pkgcache.cc')
-rw-r--r-- | apt-pkg/pkgcache.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc index 8b0e85ea3..3e01e771d 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.19 1998/12/04 22:56:52 jgg Exp $ +// $Id: pkgcache.cc,v 1.20 1998/12/07 07:26:19 jgg Exp $ /* ###################################################################### Package Cache - Accessor code for the cache @@ -159,7 +159,8 @@ pkgCache::PkgIterator pkgCache::FindPkg(string Name) Package *Pkg = PkgP + HeaderP->HashTable[Hash(Name)]; for (; Pkg != PkgP; Pkg = PkgP + Pkg->NextPackage) { - if (Pkg->Name != 0 && StrP + Pkg->Name == Name) + if (Pkg->Name != 0 && StrP[Pkg->Name] == Name[0] && + StrP + Pkg->Name == Name) return PkgIterator(*this,Pkg); } return PkgIterator(*this,0); |