From 999eabed33ca98d38f64f76ba7649fa099a6ca4c Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Wed, 12 Oct 2005 16:04:11 +0000 Subject: [PATCH] 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 --- deal.II/deal.II/source/grid/grid_in.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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); -- 2.39.5