]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Improve operator -- 1878/head
authorBruno Turcksin <bruno.turcksin@gmail.com>
Tue, 17 Nov 2015 15:25:47 +0000 (09:25 -0600)
committerBruno Turcksin <bruno.turcksin@gmail.com>
Tue, 17 Nov 2015 15:25:47 +0000 (09:25 -0600)
include/deal.II/grid/tria_accessor.templates.h

index 4e68cf6f98c1dfc7e6121240173419cf9a257ac7..031e86d7702b03d62dda792d3750ab0f52f94a7c 100644 (file)
@@ -2240,10 +2240,11 @@ inline
 void
 TriaAccessor<0, dim, spacedim>::operator -- ()
 {
-  if (global_vertex_index!=numbers::invalid_unsigned_int)
+  if (global_vertex_index != numbers::invalid_unsigned_int)
     {
-      --global_vertex_index;
-      if (global_vertex_index==static_cast<unsigned int>(-1))
+      if (global_vertex_index != 0)
+        --global_vertex_index;
+      else
         global_vertex_index = 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.