]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Silence -Warray-bounds warnings for clang
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 9 Nov 2012 17:11:02 +0000 (17:11 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 9 Nov 2012 17:11:02 +0000 (17:11 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_cmake@27495 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/base/point.h

index a87204fe21dbd212d64f59f2b02d9d4cfea399c4..b247ce6cc74ceb8e3c0c6f4e12fb9539149f6df8 100644 (file)
@@ -225,6 +225,7 @@ inline
 Point<dim,Number>::Point (const Number x)
 {
   Assert (dim==1, StandardExceptions::ExcInvalidConstructorCall());
+  if(dim != 1) return;
   this->values[0] = x;
 }
 
@@ -235,6 +236,7 @@ inline
 Point<dim,Number>::Point (const Number x, const Number y)
 {
   Assert (dim==2, StandardExceptions::ExcInvalidConstructorCall());
+  if(dim != 2) return;
   this->values[0] = x;
   this->values[1] = y;
 }
@@ -246,6 +248,7 @@ inline
 Point<dim,Number>::Point (const Number x, const Number y, const Number z)
 {
   Assert (dim==3, StandardExceptions::ExcInvalidConstructorCall());
+  if(dim != 3) return;
   this->values[0] = x;
   this->values[1] = y;
   this->values[2] = z;

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.