Mesh: modernize type checking

This commit is contained in:
Florian Foinant-Willig
2023-10-15 21:39:13 +02:00
parent 939f30420c
commit 2e16f5aa36
9 changed files with 41 additions and 44 deletions

View File

@@ -141,7 +141,7 @@ void MeshObject::getFacesFromSubElement(const Data::Segment* element,
std::vector<Base::Vector3d>& /*pointNormals*/,
std::vector<Facet>& faces) const
{
if (element && element->getTypeId() == MeshSegment::getClassTypeId()) {
if (element && element->is<MeshSegment>()) {
const MeshSegment* segm = static_cast<const MeshSegment*>(element);
if (segm->segment) {
Base::Reference<MeshObject> submesh(