From: Martin Kronbichler Date: Thu, 23 Mar 2017 12:23:21 +0000 (+0100) Subject: Add warning with clang compiler X-Git-Tag: v8.5.0-rc1~15^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F4096%2Fhead;p=dealii.git Add warning with clang compiler --- diff --git a/source/fe/mapping_q_generic.cc b/source/fe/mapping_q_generic.cc index 07197cc4da..b00343edde 100644 --- a/source/fe/mapping_q_generic.cc +++ b/source/fe/mapping_q_generic.cc @@ -3693,13 +3693,14 @@ add_quad_support_points(const Triangulation<3,3>::cell_iterator &cell, // points. The second check is to find out whether the Boundary object // is actually a StraightBoundary (the default flat manifold assigned to // the triangulation if no manifold is assigned). - if ((dynamic_cast *>(&face->get_manifold()) && - std::string(typeid(face->get_manifold()).name()).find("StraightBoundary") == - std::string::npos)) + const Boundary<3,3> *boundary = + dynamic_cast *>(&face->get_manifold()); + if (boundary != NULL && + std::string(typeid(*boundary).name()).find("StraightBoundary") == + std::string::npos) { // ask the boundary/manifold object to return intermediate points on it tmp_points.resize((polynomial_degree-1)*(polynomial_degree-1)); - const Boundary<3,3> *boundary = dynamic_cast *>(&face->get_manifold()); boundary->get_intermediate_points_on_quad(face, tmp_points); for (unsigned int i=0; iadjust_quad_dof_index_for_face_orientation(i,