]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Avoid a warning about a dangling 'else'. 2276/head
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 29 Feb 2016 21:09:04 +0000 (15:09 -0600)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 29 Feb 2016 21:09:04 +0000 (15:09 -0600)
source/grid/manifold.cc

index 4aaf6d3aa0d23bec36dbb174e5db6b8f42c140dd..42f2e8c281147c05ecff7ad86b0a955099dcce12 100644 (file)
@@ -305,10 +305,12 @@ FlatManifold<dim, spacedim>::get_tangent_vector (const Point<spacedim> &x1,
   // around (i.e., via the periodic box)
   for (unsigned int d=0; d<spacedim; ++d)
     if (periodicity[d] > tolerance)
-      if (direction[d] < -periodicity[d]/2)
-        direction[d] += periodicity[d];
-      else if (direction[d] > periodicity[d]/2)
-        direction[d] -= periodicity[d];
+      {
+        if (direction[d] < -periodicity[d]/2)
+          direction[d] += periodicity[d];
+        else if (direction[d] > periodicity[d]/2)
+          direction[d] -= periodicity[d];
+      }
 
   return direction;
 }

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.