diff --git a/src/Mod/Mesh/App/FeatureMeshTransform.cpp b/src/Mod/Mesh/App/FeatureMeshTransform.cpp index e8c1f9574b..4e9de70a28 100644 --- a/src/Mod/Mesh/App/FeatureMeshTransform.cpp +++ b/src/Mod/Mesh/App/FeatureMeshTransform.cpp @@ -42,7 +42,7 @@ Transform::Transform() App::DocumentObjectExecReturn* Transform::execute() { /* - Feature* pcFirst = dynamic_cast(Source.getValue()); + Feature* pcFirst = freecad_cast(Source.getValue()); if (!pcFirst || pcFirst->isError()) return new App::DocumentObjectExecReturn("Unknown Error"); diff --git a/src/Mod/Mesh/App/FeatureMeshTransformDemolding.cpp b/src/Mod/Mesh/App/FeatureMeshTransformDemolding.cpp index 4525a80c88..293ceebbc2 100644 --- a/src/Mod/Mesh/App/FeatureMeshTransformDemolding.cpp +++ b/src/Mod/Mesh/App/FeatureMeshTransformDemolding.cpp @@ -40,7 +40,7 @@ TransformDemolding::TransformDemolding() App::DocumentObjectExecReturn* TransformDemolding::execute() { /* - Feature *pcFirst = dynamic_cast(Source.getValue()); + Feature *pcFirst = freecad_cast(Source.getValue()); if (!pcFirst || pcFirst->isError()) return new App::DocumentObjectExecReturn("Unknown Error"); diff --git a/src/Mod/Mesh/Gui/ViewProvider.cpp b/src/Mod/Mesh/Gui/ViewProvider.cpp index 5a9027ab1f..338b060dd4 100644 --- a/src/Mod/Mesh/Gui/ViewProvider.cpp +++ b/src/Mod/Mesh/Gui/ViewProvider.cpp @@ -1793,7 +1793,7 @@ void ViewProviderMesh::fillHoleCallback(void* ud, SoEventCallback* cb) // By specifying the indexed mesh node 'pcFaceSet' we make sure that the picked point is // really from the mesh we render and not from any other geometry Gui::ViewProvider* vp = view->getViewProviderByPathFromTail(point->getPath()); - if (auto that = dynamic_cast(vp)) { + if (auto that = freecad_cast(vp)) { const SoDetail* detail = point->getDetail(that->getShapeNode()); if (detail && detail->getTypeId() == SoFaceDetail::getClassTypeId()) { // get the boundary to the picked facet @@ -1868,7 +1868,7 @@ void ViewProviderMesh::markPartCallback(void* ud, SoEventCallback* cb) // By specifying the indexed mesh node 'pcFaceSet' we make sure that the picked point is // really from the mesh we render and not from any other geometry Gui::ViewProvider* vp = view->getViewProviderByPathFromTail(point->getPath()); - if (auto that = dynamic_cast(vp)) { + if (auto that = freecad_cast(vp)) { const SoDetail* detail = point->getDetail(that->getShapeNode()); if (detail && detail->getTypeId() == SoFaceDetail::getClassTypeId()) { // get the boundary to the picked facet diff --git a/src/Mod/Mesh/Gui/ViewProviderCurvature.cpp b/src/Mod/Mesh/Gui/ViewProviderCurvature.cpp index aaf5580564..04d6c59718 100644 --- a/src/Mod/Mesh/Gui/ViewProviderCurvature.cpp +++ b/src/Mod/Mesh/Gui/ViewProviderCurvature.cpp @@ -325,7 +325,7 @@ void ViewProviderMeshCurvature::updateData(const App::Property* prop) // get the view provider of the associated mesh feature App::Document* rDoc = pcObject->getDocument(); Gui::Document* pDoc = Gui::Application::Instance->getDocument(rDoc); - if (auto view = dynamic_cast(pDoc->getViewProvider(object))) { + if (auto view = freecad_cast(pDoc->getViewProvider(object))) { this->pcLinkRoot->addChild(view->getHighlightNode()); auto mesh = view->getObject(); @@ -563,7 +563,7 @@ void ViewProviderMeshCurvature::curvatureInfoCallback(void* ud, SoEventCallback* // By specifying the indexed mesh node 'pcFaceSet' we make sure that the picked point is // really from the mesh we render and not from any other geometry Gui::ViewProvider* vp = view->getViewProviderByPathFromTail(point->getPath()); - if (auto self = dynamic_cast(vp)) { + if (auto self = freecad_cast(vp)) { const SoDetail* detail = point->getDetail(point->getPath()->getTail()); if (detail && detail->getTypeId() == SoFaceDetail::getClassTypeId()) { const auto facedetail = static_cast(detail); // NOLINT @@ -597,7 +597,7 @@ void ViewProviderMeshCurvature::curvatureInfoCallback(void* ud, SoEventCallback* // By specifying the indexed mesh node 'pcFaceSet' we make sure that the picked point is // really from the mesh we render and not from any other geometry Gui::ViewProvider* vp = view->getViewProviderByPathFromTail(point->getPath()); - if (auto self = dynamic_cast(vp)) { + if (auto self = freecad_cast(vp)) { const SoDetail* detail = point->getDetail(point->getPath()->getTail()); if (detail && detail->getTypeId() == SoFaceDetail::getClassTypeId()) { const auto facedetail = static_cast(detail); // NOLINT