From: Daniel Arndt Date: Thu, 29 Nov 2018 18:10:01 +0000 (+0100) Subject: Use previous style for checking reference type dynamic_casts X-Git-Tag: v9.1.0-rc1~520^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F7486%2Fhead;p=dealii.git Use previous style for checking reference type dynamic_casts --- diff --git a/source/fe/fe_poly.cc b/source/fe/fe_poly.cc index e87658aacc..fc419f181b 100644 --- a/source/fe/fe_poly.cc +++ b/source/fe/fe_poly.cc @@ -45,7 +45,9 @@ FE_Poly, 1, 2>::fill_fe_values( { // convert data object to internal data for this class. fails with an // exception if that is not possible - const InternalData &fe_data = dynamic_cast(fe_internal); + Assert(dynamic_cast(&fe_internal) != nullptr, + ExcInternalError()); + const InternalData &fe_data = static_cast(fe_internal); // transform gradients and higher derivatives. there is nothing to do // for values since we already emplaced them into output_data when @@ -111,7 +113,9 @@ FE_Poly, 2, 3>::fill_fe_values( { // convert data object to internal data for this class. fails with an // exception if that is not possible - const InternalData &fe_data = dynamic_cast(fe_internal); + Assert(dynamic_cast(&fe_internal) != nullptr, + ExcInternalError()); + const InternalData &fe_data = static_cast(fe_internal); // transform gradients and higher derivatives. there is nothing to do // for values since we already emplaced them into output_data when @@ -176,7 +180,9 @@ FE_Poly, 1, 2>::fill_fe_values( { // convert data object to internal data for this class. fails with an // exception if that is not possible - const InternalData &fe_data = dynamic_cast(fe_internal); + Assert(dynamic_cast(&fe_internal) != nullptr, + ExcInternalError()); + const InternalData &fe_data = static_cast(fe_internal); // transform gradients and higher derivatives. there is nothing to do // for values since we already emplaced them into output_data when @@ -241,7 +247,9 @@ FE_Poly, 2, 3>::fill_fe_values( { // convert data object to internal data for this class. fails with an // exception if that is not possible - const InternalData &fe_data = dynamic_cast(fe_internal); + Assert(dynamic_cast(&fe_internal) != nullptr, + ExcInternalError()); + const InternalData &fe_data = static_cast(fe_internal); // transform gradients and higher derivatives. there is nothing to do // for values since we already emplaced them into output_data when