From: Martin Kronbichler Date: Sun, 21 Apr 2013 17:23:40 +0000 (+0000) Subject: Make fixed_power also work for data types that have no implicit conversion from int... X-Git-Tag: v8.0.0~644 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=315fa84d11c992d9d4c1e9696e4bed47d2d5e656;p=dealii.git Make fixed_power also work for data types that have no implicit conversion from int by avoiding setting the return value to 1 for N==0 (only N>0 allowed anyway). git-svn-id: https://svn.dealii.org/trunk@29355 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/base/utilities.h b/deal.II/include/deal.II/base/utilities.h index a4924d1800..a7a3591bec 100644 --- a/deal.II/include/deal.II/base/utilities.h +++ b/deal.II/include/deal.II/base/utilities.h @@ -680,8 +680,6 @@ namespace Utilities Assert (N>0, ExcNotImplemented()); switch (N) { - case 0: - return 1; case 1: return n; case 2: @@ -691,8 +689,8 @@ namespace Utilities case 4: return n*n*n*n; default: - T result = 1; - for (int d=0; d