return 1;
}
- // Shouldnt happen
+ // Shouldn't happen
return 1;
}
/*}}}*/
return true;
if (PkgVer == 0 || PkgVer[0] == 0)
return false;
-
- // Perform the actual comparision.
- int Res = CmpVersion(PkgVer,DepVer);
- switch (Op & 0x0F)
+ Op &= 0x0F;
+
+ // fast track for (equal) strings [by location] which are by definition equal versions
+ if (PkgVer == DepVer)
+ return Op == pkgCache::Dep::Equals || Op == pkgCache::Dep::LessEq || Op == pkgCache::Dep::GreaterEq;
+
+ // Perform the actual comparison.
+ int const Res = CmpVersion(PkgVer, DepVer);
+ switch (Op)
{
case pkgCache::Dep::LessEq:
if (Res <= 0)