diff options
author | Julian Andres Klode <jak@debian.org> | 2016-01-08 00:52:29 +0100 |
---|---|---|
committer | Julian Andres Klode <jak@debian.org> | 2016-01-08 00:52:29 +0100 |
commit | 57590d3c6e6b055402c938c3baebf1d872c58f7e (patch) | |
tree | f7cf78187695a1820d0cd38d04eb69e5901e2533 /apt-pkg/pkgcachegen.cc | |
parent | dd592790c8f1be4925f74266742c163516ab80c7 (diff) |
Replace compare() == 0 checks with this == other checks
This improves performance, as we now can ignore unequal strings
based on their length already.
Gbp-Dch: ignore
Diffstat (limited to 'apt-pkg/pkgcachegen.cc')
-rw-r--r-- | apt-pkg/pkgcachegen.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc index 654c5f279..577a6e474 100644 --- a/apt-pkg/pkgcachegen.cc +++ b/apt-pkg/pkgcachegen.cc @@ -1014,7 +1014,7 @@ bool pkgCacheListParser::NewDepends(pkgCache::VerIterator &Ver, { int const CmpOp = Op & 0x0F; // =-deps are used (79:1) for lockstep on same-source packages (e.g. data-packages) - if (CmpOp == pkgCache::Dep::Equals && Version.compare(Ver.VerStr()) == 0) + if (CmpOp == pkgCache::Dep::Equals && Version == Ver.VerStr()) idxVersion = Ver->VerStr; if (idxVersion == 0) |