From 8b15717ee43ac01c701243212fff2ce65a74fd8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20M=C3=B6ller?= Date: Wed, 14 Nov 2012 10:25:10 +0100 Subject: [PATCH] Use the correct type when iterating std::strings --- CGAL_Core/include/CGAL/CORE/poly/Poly.tcc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CGAL_Core/include/CGAL/CORE/poly/Poly.tcc b/CGAL_Core/include/CGAL/CORE/poly/Poly.tcc index 0a341a70f23..e747e7a8d20 100644 --- a/CGAL_Core/include/CGAL/CORE/poly/Poly.tcc +++ b/CGAL_Core/include/CGAL/CORE/poly/Poly.tcc @@ -146,7 +146,7 @@ template void Polynomial::constructFromString(string & s, char myX) { if(myX != 'x' || myX != 'X'){ //Replace myX with 'x'. - unsigned int loc = s.find(myX, 0); + string::size_type loc = s.find(myX, 0); while(loc != string::npos){ s.replace(loc,1,1,'x'); loc = s.find(myX, loc+1); @@ -307,7 +307,7 @@ template Polynomial Polynomial::getpoly(string & s){ //Remove white spaces from the string - unsigned int cnt=s.find(' ',0); + string::size_type cnt=s.find(' ',0); while(cnt != string::npos){ s.erase(cnt, 1); cnt = s.find(' ', cnt); @@ -321,7 +321,7 @@ Polynomial Polynomial::getpoly(string & s){ //To handle the case when there is one '=' sign //Suppose s is of the form s1 = s2. Then we assign s to //s1 + (-1)(s2) and reset len - unsigned int loc; + string::size_type loc; if((loc=s.find('=',0)) != string::npos){ s.replace(loc,1,1,'+'); string s3 = "(-1)(";