]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Replace a hand-written loop by std::fill. 8751/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Sat, 14 Sep 2019 03:53:43 +0000 (21:53 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Sat, 14 Sep 2019 03:53:43 +0000 (21:53 -0600)
source/grid/tria.cc

index b355cade3be1b45e54aa5376e99b319e0b413d7b..fa90b7039f32b7685163457cf24e3d5e706e666e 100644 (file)
@@ -49,8 +49,9 @@ CellData<structdim>::CellData()
   : material_id(0)
   , manifold_id(numbers::flat_manifold_id)
 {
-  for (unsigned int i = 0; i < GeometryInfo<structdim>::vertices_per_cell; ++i)
-    vertices[i] = numbers::invalid_unsigned_int;
+  std::fill(std::begin(vertices),
+            std::end(vertices),
+            numbers::invalid_unsigned_int);
 }
 
 

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.