From: Wolfgang Bangerth Date: Thu, 2 May 2013 15:25:44 +0000 (+0000) Subject: Do not use std::numeric_limits on enum types -- max() is always zero X-Git-Tag: v8.0.0~584 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a135229cc6a518266a9df3db037643426fdb0f26;p=dealii.git Do not use std::numeric_limits on enum types -- max() is always zero in that case... git-svn-id: https://svn.dealii.org/trunk@29431 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/source/fe/fe_system.cc b/deal.II/source/fe/fe_system.cc index 88b5f3666a..6bb7de8489 100644 --- a/deal.II/source/fe/fe_system.cc +++ b/deal.II/source/fe/fe_system.cc @@ -2677,18 +2677,27 @@ FESystem::multiply_dof_numbers ( summed_multiplicities += multiplicities[i]; } - // assume maximal conformity and then take away bits - // as indicated by the base elements - typename FiniteElementData::Conformity - total_conformity - = std::numeric_limits::Conformity>::max(); - - for (unsigned int i=0; i0) - total_conformity = - typename FiniteElementData::Conformity(total_conformity - & - fes[i]->conforming_space); + // assume conformity of the first finite element and then take away + // bits as indicated by the base elements. if all multiplicities + // happen to be zero, then it doesn't matter what we set it to. + typename FiniteElementData::Conformity total_conformity + = typename FiniteElementData::Conformity(); + { + unsigned int index = 0; + for (unsigned int index=0; index0) + { + total_conformity = fes[index]->conforming_space; + break; + } + + for (; index0) + total_conformity = + typename FiniteElementData::Conformity(total_conformity + & + fes[index]->conforming_space); + } std::vector dpo; dpo.push_back(multiplied_dofs_per_vertex);