]> https://gitweb.dealii.org/ - dealii.git/commitdiff
On 64-bit systems, size_type is not the same as unsigned int, and the last comparison...
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 12 Oct 2005 16:04:11 +0000 (16:04 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 12 Oct 2005 16:04:11 +0000 (16:04 +0000)
git-svn-id: https://svn.dealii.org/trunk@11592 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/grid/grid_in.cc

index 3adc46374d7d41e05a1092c99ceff56330b616f8..6582f69b0d19d70ef56181cdfd11330746fbc381 100644 (file)
@@ -1441,10 +1441,10 @@ void GridIn<dim>::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);

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.