]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Make body-less loops more obvious to read, and thereby also suppress a warning that...
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 2 Aug 2007 22:03:24 +0000 (22:03 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 2 Aug 2007 22:03:24 +0000 (22:03 +0000)
git-svn-id: https://svn.dealii.org/trunk@14887 0785d39b-7218-0410-832d-ea1e28bc413d

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

index 4ad36aa2db2bab1d3d542563751db202c300e0c4..cfd26afc278dc41134768518ae7be2e4b3cfe127 100644 (file)
@@ -251,7 +251,8 @@ void GridIn<dim>::read_dbmesh (std::istream &in)
                                   // knowledge to parse and interpret
                                   // the other fields in between as
                                   // well...
-  while (getline(in,line), line.find("# END")==std::string::npos);
+  while (getline(in,line), line.find("# END")==std::string::npos)
+    ;
   skip_empty_lines (in);
 
 
@@ -356,7 +357,8 @@ void GridIn<dim>::read_dbmesh (std::istream &in)
                                   // clue what they mean. skip them
                                   // all and leave the interpretation
                                   // to other implementors...
-  while (getline(in,line), ((line.find("End")==std::string::npos) && (in)));
+  while (getline(in,line), ((line.find("End")==std::string::npos) && (in)))
+    ;
                                   // ok, so we are not at the end of
                                   // the file, that's it, mostly
 
@@ -1719,7 +1721,9 @@ void GridIn<dim>::skip_comment_lines (std::istream &in,
   while ((c=in.get()) == comment_start)
                                     // loop over the characters after
                                     // the comment starter
-    while (in.get() != '\n');
+    while (in.get() != '\n')
+      ;
+  
   
                                   // put back first character of
                                   // first non-comment line
index 627fb9f1927881dbcc91f982ccd6cdf3849c9f35..2944383e8f0ea6af71aefea429bbdc69a064eab8 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 by the deal.II authors
+//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -61,7 +61,8 @@ void advance_by_n (CellIterator &cell,
                                   // dereferencing cell-> triggers an
                                   // assertion)
   const CellIterator endc = cell->get_dof_handler().end();
-  for (unsigned int t=0; ((t<n) && (cell!=endc)); ++t, ++cell);
+  for (unsigned int t=0; ((t<n) && (cell!=endc)); ++t, ++cell)
+    ;
 }
 
 
@@ -712,7 +713,9 @@ estimate_some (const hp::MappingCollection<dim>                  &mapping,
                                   // `hard' cells to the different
                                   // threads.
   for (unsigned int t=0; (t<this_thread.first) && (cell!=dof_handler.end());
-       ++t, ++cell);
+       ++t, ++cell)
+    ;
+  
 
   
                                   // loop over all cells for this thread

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.