string const arch = _config->Find("APT::Architecture");
size_t const found = Package.rfind(':');
if (found != StringView::npos &&
- (Package.compare(found, Package.size(), ":any") == 0 ||
- Package.compare(found, Package.size(), ":native") == 0||
- Package.compare(found +1, Package.size(), arch) == 0))
+ (Package.substr(found) == ":any" ||
+ Package.substr(found) == ":native" ||
+ Package.substr(found +1) == arch))
Package = Package.substr(0,found);
}
if (NewDepends(Ver,Package,pkgArch,Version,Op,Type) == false)
return false;
}
- else if (Package.compare(found, Package.npos, ":any") == 0)
+ else if (Package.substr(found) == ":any")
{
if (NewDepends(Ver,Package,"any",Version,Op,Type) == false)
return false;
{
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)