]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fix one more warning about hiding a local variable.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 1 Mar 2014 03:43:35 +0000 (03:43 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 1 Mar 2014 03:43:35 +0000 (03:43 +0000)
git-svn-id: https://svn.dealii.org/trunk@32591 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/base/data_out_base.cc

index bc33d4e57f824a360edf4907ab9d111362cdba16..f4ce58050fc18368c250b22976a35f109bd216d4 100644 (file)
@@ -1,7 +1,7 @@
 // ---------------------------------------------------------------------
 // $Id$
 //
-// Copyright (C) 1999 - 2013 by the deal.II authors
+// Copyright (C) 1999 - 2014 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -3664,12 +3664,12 @@ namespace DataOutBase
       }
 
     // max. and min. heigth of solution
-    typename std::vector<Patch<dim,spacedim> >::const_iterator patch=patches.begin();
-    Assert(patch!=patches.end(), ExcInternalError());
-    double hmin=patch->data(0,0);
-    double hmax=patch->data(0,0);
+    Assert(patches.size()>0, ExcInternalError());
+    double hmin=patches[0].data(0,0);
+    double hmax=patches[0].data(0,0);
 
-    for (; patch != patches.end(); ++patch)
+    for (typename std::vector<Patch<dim,spacedim> >::const_iterator patch=patches.begin();
+        patch != patches.end(); ++patch)
       {
         const unsigned int n_subdivisions = patch->n_subdivisions;
 

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.