From 8d9850a1854fb081d4ae571c25322ececd77145a Mon Sep 17 00:00:00 2001 From: Arch Librarian Date: Mon, 20 Sep 2004 16:58:01 +0000 Subject: G++3 fixes from Randolph Author: jgg Date: 2001-05-22 06:20:06 GMT G++3 fixes from Randolph --- apt-pkg/versionmatch.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'apt-pkg/versionmatch.cc') diff --git a/apt-pkg/versionmatch.cc b/apt-pkg/versionmatch.cc index 194df9ebc..d4ae21d56 100644 --- a/apt-pkg/versionmatch.cc +++ b/apt-pkg/versionmatch.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: versionmatch.cc,v 1.3 2001/04/29 05:13:51 jgg Exp $ +// $Id: versionmatch.cc,v 1.4 2001/05/22 06:20:06 jgg Exp $ /* ###################################################################### Version Matching @@ -20,6 +20,7 @@ #include #include +#include /*}}}*/ // VersionMatch::pkgVersionMatch - Constructor /*{{{*/ @@ -36,7 +37,7 @@ pkgVersionMatch::pkgVersionMatch(string Data,MatchType Type) : Type(Type) if (Data.end()[-1] == '*') { VerPrefixMatch = true; - VerStr = string(Data.begin(),Data.end()-1); + VerStr = string(Data,0,Data.length()-1); } else VerStr = Data; @@ -50,8 +51,8 @@ pkgVersionMatch::pkgVersionMatch(string Data,MatchType Type) : Type(Type) return; // Are we a simple specification? - const char *I = Data.begin(); - for (; I < Data.end() && *I != '='; I++); + string::const_iterator I = Data.begin(); + for (; I != Data.end() && *I != '='; I++); if (I == Data.end()) { // Temporary @@ -124,8 +125,7 @@ bool pkgVersionMatch::MatchVer(const char *A,string B,bool Prefix) return false; // Match (leading?) - if (stringcasecmp(B.begin(),B.end(), - Ab,Ab + B.length()) == 0) + if (stringcasecmp(B,Ab,Ab + B.length()) == 0) return true; return false; -- cgit v1.2.3