]> https://gitweb.dealii.org/ - dealii.git/commitdiff
use range-based for loop
authorMatthias Maier <tamiko@43-1.org>
Sat, 11 May 2019 21:01:08 +0000 (16:01 -0500)
committerMatthias Maier <tamiko@43-1.org>
Sun, 12 May 2019 15:27:21 +0000 (10:27 -0500)
examples/step-6/step-6.cc

index 18bb3b476823c404fcc17dbb6d04c694c3bcbcbd..583a8de938a84d48d617a4c451473bcca16e73b1 100644 (file)
@@ -284,10 +284,7 @@ void Step6<dim>::assemble_system()
 
   std::vector<types::global_dof_index> local_dof_indices(dofs_per_cell);
 
-  typename DoFHandler<dim>::active_cell_iterator cell =
-                                                   dof_handler.begin_active(),
-                                                 endc = dof_handler.end();
-  for (; cell != endc; ++cell)
+  for (const auto cell : dof_handler.active_cell_iterators())
     {
       cell_matrix = 0;
       cell_rhs    = 0;

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.