]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Simplify code by using the funny looking if(type var=val) {...}
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 11 Aug 2006 11:30:00 +0000 (11:30 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 11 Aug 2006 11:30:00 +0000 (11:30 +0000)
git-svn-id: https://svn.dealii.org/trunk@13652 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/fe/fe_q.cc

index 6f91736d051085b641cf46dbce124bb3e72ad03b..f90a33f340ce9c9735563418874cd0355c4c7cdd 100644 (file)
@@ -575,8 +575,7 @@ hp_vertex_dof_identities (const FiniteElement<dim> &fe_other) const
                                   // should be exactly one single DoF
                                   // of each FE at a vertex, and they
                                   // should have identical value
-  const FE_Q<dim> *fe_q_other = dynamic_cast<const FE_Q<dim>*>(&fe_other);
-  if (fe_q_other != 0)
+  if (dynamic_cast<const FE_Q<dim>*>(&fe_other) != 0)
     return
       std::vector<std::pair<unsigned int, unsigned int> > (1, std::make_pair (0U, 0U));
   else
@@ -596,8 +595,7 @@ hp_line_dof_identities (const FiniteElement<dim> &fe_other) const
                                   // we can presently only compute
                                   // these identities if both FEs are
                                   // FE_Qs
-  const FE_Q<dim> *fe_q_other = dynamic_cast<const FE_Q<dim>*>(&fe_other);
-  if (fe_q_other != 0)
+  if (const FE_Q<dim> *fe_q_other = dynamic_cast<const FE_Q<dim>*>(&fe_other))
     {
                                       // dofs are located along
                                       // lines, so two dofs are
@@ -640,8 +638,7 @@ hp_quad_dof_identities (const FiniteElement<dim>        &fe_other) const
                                   // we can presently only compute
                                   // these identities if both FEs are
                                   // FE_Qs
-  const FE_Q<dim> *fe_q_other = dynamic_cast<const FE_Q<dim>*>(&fe_other);
-  if (fe_q_other != 0)
+  if (const FE_Q<dim> *fe_q_other = dynamic_cast<const FE_Q<dim>*>(&fe_other))
     {
                                       // this works exactly like the line
                                       // case above, except that now we

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.