X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/b49068c566d749130e023536d54588c948c16edf..610e13842a3718128c03454c5dfcbde49d323281:/apt-pkg/policy.cc diff --git a/apt-pkg/policy.cc b/apt-pkg/policy.cc index 4f953bd50..b36f4d4b7 100644 --- a/apt-pkg/policy.cc +++ b/apt-pkg/policy.cc @@ -235,7 +235,7 @@ pkgCache::VerIterator pkgPolicy::GetCandidateVerNew(pkgCache::PkgIterator const int candPriority = -1; pkgVersioningSystem *vs = Cache->VS; - for (pkgCache::VerIterator ver = Pkg.VersionList(); ver.end() == false; ver++) { + for (pkgCache::VerIterator ver = Pkg.VersionList(); ver.end() == false; ++ver) { int priority = GetPriority(ver, true); if (priority == 0 || priority <= candPriority) @@ -322,7 +322,7 @@ void pkgPolicy::CreatePin(pkgVersionMatch::MatchType Type,string Name, // Find matching version(s) and copy the pin into it pkgVersionMatch Match(P->Data,P->Type); - for (pkgCache::VerIterator Ver = Pkg.VersionList(); Ver.end() != true; Ver++) + for (pkgCache::VerIterator Ver = Pkg.VersionList(); Ver.end() != true; ++Ver) { if (Match.VersionMatches(Ver)) { Pin *VP = VerPins + Ver->ID; @@ -438,11 +438,11 @@ bool ReadPinFile(pkgPolicy &Plcy,string File) return true; FileFd Fd(File,FileFd::ReadOnly); - pkgTagFile TF(&Fd); + pkgTagFile TF(&Fd, pkgTagFile::SUPPORT_COMMENTS); if (Fd.IsOpen() == false || Fd.Failed()) return false; - pkgUserTagSection Tags; + pkgTagSection Tags; while (TF.Step(Tags) == true) { // can happen when there are only comments in a record