summaryrefslogtreecommitdiff
path: root/apt-pkg/versionmatch.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2011-11-10 16:32:52 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2011-11-10 16:32:52 +0100
commit71ecaad29d8066a494f516efc5efd80860653fe2 (patch)
treeb0769df88e2b6496f23e3d899aeb1c240a3488d9 /apt-pkg/versionmatch.cc
parenta865ed25fa54514224cf4d6f83dd9cf48b7ed02b (diff)
parent37adedc9d0b66eeae7efb88aebd08dfbc6e06f77 (diff)
merged from http://bzr.debian.org/bzr/apt/apt/debian-experimental2
Diffstat (limited to 'apt-pkg/versionmatch.cc')
-rw-r--r--apt-pkg/versionmatch.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/apt-pkg/versionmatch.cc b/apt-pkg/versionmatch.cc
index c40b1fdbc..e4fa0ea65 100644
--- a/apt-pkg/versionmatch.cc
+++ b/apt-pkg/versionmatch.cc
@@ -11,8 +11,9 @@
##################################################################### */
/*}}}*/
// Include Files /*{{{*/
-#include <apt-pkg/versionmatch.h>
+#include<config.h>
+#include <apt-pkg/versionmatch.h>
#include <apt-pkg/strutl.h>
#include <apt-pkg/error.h>
@@ -21,9 +22,10 @@
#include <fnmatch.h>
#include <sys/types.h>
#include <regex.h>
-
/*}}}*/
+using std::string;
+
// VersionMatch::pkgVersionMatch - Constructor /*{{{*/
// ---------------------------------------------------------------------
/* Break up the data string according to the selected type */
@@ -60,7 +62,7 @@ pkgVersionMatch::pkgVersionMatch(string Data,MatchType Type) : Type(Type)
// Are we a simple specification?
string::const_iterator I = Data.begin();
- for (; I != Data.end() && *I != '='; I++);
+ for (; I != Data.end() && *I != '='; ++I);
if (I == Data.end())
{
// Temporary
@@ -152,7 +154,7 @@ bool pkgVersionMatch::MatchVer(const char *A,string B,bool Prefix)
pkgCache::VerIterator pkgVersionMatch::Find(pkgCache::PkgIterator Pkg)
{
pkgCache::VerIterator Ver = Pkg.VersionList();
- for (; Ver.end() == false; Ver++)
+ for (; Ver.end() == false; ++Ver)
{
if (Type == Version)
{
@@ -163,7 +165,7 @@ pkgCache::VerIterator pkgVersionMatch::Find(pkgCache::PkgIterator Pkg)
continue;
}
- for (pkgCache::VerFileIterator VF = Ver.FileList(); VF.end() == false; VF++)
+ for (pkgCache::VerFileIterator VF = Ver.FileList(); VF.end() == false; ++VF)
if (FileMatch(VF.File()) == true)
return Ver;
}