]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Bugfix: Fix a meaningless comparison
authorMatthias Maier <tamiko@kyomu.43-1.org>
Wed, 3 Jul 2013 09:01:44 +0000 (09:01 +0000)
committerMatthias Maier <tamiko@kyomu.43-1.org>
Wed, 3 Jul 2013 09:01:44 +0000 (09:01 +0000)
"i != -1", where i is an unsigned int is always true - there is no implicit
cast of '-1' to unsigned char. It has to read "i != (unsigned char) -1"

git-svn-id: https://svn.dealii.org/trunk@29922 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/grid/tria_accessor.h

index fea050957357e11be55ee2855636ba73a42ef9bf..75d44e5a5a951823c397da5a9963e1b7d222d072 100644 (file)
@@ -3226,7 +3226,7 @@ CellAccessor<dim,spacedim>::id() const
             }
         }
 
-      Assert(v!=-1, ExcInternalError());
+      Assert(v != (unsigned char)-1, ExcInternalError());
       id[ptr.level()-1] = v;
 
       ptr.copy_from( *(ptr.parent()));

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.