From: Wolfgang Bangerth Date: Wed, 12 Oct 2005 16:04:11 +0000 (+0000) Subject: On 64-bit systems, size_type is not the same as unsigned int, and the last comparison... X-Git-Tag: v8.0.0~13011 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=999eabed33ca98d38f64f76ba7649fa099a6ca4c;p=dealii.git On 64-bit systems, size_type is not the same as unsigned int, and the last comparison is therefore always false. git-svn-id: https://svn.dealii.org/trunk@11592 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/source/grid/grid_in.cc b/deal.II/deal.II/source/grid/grid_in.cc index 3adc46374d..6582f69b0d 100644 --- a/deal.II/deal.II/source/grid/grid_in.cc +++ b/deal.II/deal.II/source/grid/grid_in.cc @@ -1441,10 +1441,10 @@ void GridIn::read (const std::string& filename, if (format == Default) { - const unsigned int slashpos = name.find_last_of('/'); - const unsigned int dotpos = name.find_last_of('.'); + const std::string::size_type slashpos = name.find_last_of('/'); + const std::string::size_type dotpos = name.find_last_of('.'); if (dotpos < name.length() - && (dotpos > slashpos || slashpos == name.npos)) + && (dotpos > slashpos || slashpos == std::string::npos)) { std::string ext = name.substr(dotpos+1); format = parse_format(ext);