From ef309d5f7baa9c2f066619df36e2a9cd6caaa0a9 Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Thu, 23 Mar 2017 13:23:21 +0100 Subject: [PATCH] Add warning with clang compiler --- source/fe/mapping_q_generic.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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, -- 2.39.5