From: Wolfgang Bangerth Date: Wed, 15 Mar 2006 16:39:54 +0000 (+0000) Subject: Simplify template_power function for the compiler. X-Git-Tag: v8.0.0~12098 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=690aa059a77656166a8fb926edbe2fb49c9a0258;p=dealii.git Simplify template_power function for the compiler. git-svn-id: https://svn.dealii.org/trunk@12597 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/base/source/data_out_base.cc b/deal.II/base/source/data_out_base.cc index 454da55a35..4912097369 100644 --- a/deal.II/base/source/data_out_base.cc +++ b/deal.II/base/source/data_out_base.cc @@ -127,16 +127,25 @@ compute_node( // Compute n^dim, where dim is a template parameter template inline -unsigned int template_power(const unsigned int n) +unsigned int template_power (const unsigned int n) { Assert (dim>0, ExcNotImplemented()); - // The argument already contains the first power. - if (dim==1) return n; - // Else, we must compute. - unsigned int result = n; - for (unsigned int d=1;d