Surface: modernize type checking

This commit is contained in:
Florian Foinant-Willig
2023-10-15 21:39:10 +02:00
parent 24934d7843
commit bb3eb31d4e
9 changed files with 13 additions and 13 deletions

View File

@@ -63,7 +63,7 @@ App::DocumentObjectExecReturn* Cut::execute()
Part::TopoShape ts2;
// Get first toposhape
if (shapes[0]->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId())) {
if (shapes[0]->isDerivedFrom<Part::Feature>()) {
ts1 = static_cast<Part::Feature*>(shapes[0])->Shape.getShape(); // Part::TopoShape 1
}
else {
@@ -71,7 +71,7 @@ App::DocumentObjectExecReturn* Cut::execute()
}
// Get second toposhape
if (shapes[1]->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId())) {
if (shapes[1]->isDerivedFrom<Part::Feature>()) {
ts2 = static_cast<Part::Feature*>(shapes[1])->Shape.getShape();
}
else {