From 22198bdd9497859da663979be523ecaa4fd8057c Mon Sep 17 00:00:00 2001 From: bangerth Date: Fri, 11 Aug 2006 11:30:00 +0000 Subject: [PATCH] Simplify code by using the funny looking if(type var=val) {...} git-svn-id: https://svn.dealii.org/trunk@13652 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/source/fe/fe_q.cc | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/deal.II/deal.II/source/fe/fe_q.cc b/deal.II/deal.II/source/fe/fe_q.cc index 6f91736d05..f90a33f340 100644 --- a/deal.II/deal.II/source/fe/fe_q.cc +++ b/deal.II/deal.II/source/fe/fe_q.cc @@ -575,8 +575,7 @@ hp_vertex_dof_identities (const FiniteElement &fe_other) const // should be exactly one single DoF // of each FE at a vertex, and they // should have identical value - const FE_Q *fe_q_other = dynamic_cast*>(&fe_other); - if (fe_q_other != 0) + if (dynamic_cast*>(&fe_other) != 0) return std::vector > (1, std::make_pair (0U, 0U)); else @@ -596,8 +595,7 @@ hp_line_dof_identities (const FiniteElement &fe_other) const // we can presently only compute // these identities if both FEs are // FE_Qs - const FE_Q *fe_q_other = dynamic_cast*>(&fe_other); - if (fe_q_other != 0) + if (const FE_Q *fe_q_other = dynamic_cast*>(&fe_other)) { // dofs are located along // lines, so two dofs are @@ -640,8 +638,7 @@ hp_quad_dof_identities (const FiniteElement &fe_other) const // we can presently only compute // these identities if both FEs are // FE_Qs - const FE_Q *fe_q_other = dynamic_cast*>(&fe_other); - if (fe_q_other != 0) + if (const FE_Q *fe_q_other = dynamic_cast*>(&fe_other)) { // this works exactly like the line // case above, except that now we -- 2.39.5