Drawing: modernize type checking

This commit is contained in:
Florian Foinant-Willig
2023-10-15 21:39:01 +02:00
parent 027ac1b456
commit da1dd02ff0
8 changed files with 16 additions and 20 deletions

View File

@@ -67,7 +67,7 @@ App::DocumentObjectExecReturn* FeatureProjection::execute(void)
if (!link) {
return new App::DocumentObjectExecReturn("No object linked");
}
if (!link->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId())) {
if (!link->isDerivedFrom<Part::Feature>()) {
return new App::DocumentObjectExecReturn("Linked object is not a Part object");
}
const TopoDS_Shape& shape = static_cast<Part::Feature*>(link)->Shape.getShape().getShape();