]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Replace an explicit by an implicit loop.
authorWolfgang Bangerth <bangerth@colostate.edu>
Sun, 18 Jun 2017 01:17:16 +0000 (19:17 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Mon, 19 Jun 2017 03:48:48 +0000 (21:48 -0600)
source/dofs/dof_handler.cc

index c0b25610071349e010077ffd0dc6353b8bb8b51b..32d36747ceaba6e5d4a40bd79675a279ddc3daea 100644 (file)
@@ -1564,8 +1564,7 @@ void DoFHandler<dim, spacedim>::MGVertexDoFs::init (const unsigned int cl,
   const unsigned int n_indices = n_levels * dofs_per_vertex;
 
   indices = new types::global_dof_index[n_indices];
-  for (unsigned int i = 0; i < n_indices; ++i)
-    indices[i] = DoFHandler<dim, spacedim>::invalid_dof_index;
+  std::fill (indices, indices+n_indices, DoFHandler<dim,spacedim>::invalid_dof_index);
 
   indices_offset = new types::global_dof_index[n_levels];
   for (unsigned int i = 0; i < n_levels; ++i)

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.