Prefer to use BaseClass's isDerivedFrom<T> over non template or Base::Type's

Regex based changes, manually verified
This commit is contained in:
Benjamin Nauck
2025-01-16 21:27:50 +01:00
parent ae15d98fd3
commit dd6aa9f3c7
166 changed files with 484 additions and 497 deletions

View File

@@ -82,7 +82,7 @@ App::DocumentObjectExecReturn* FeatureArea::execute()
}
for (std::vector<App::DocumentObject*>::iterator it = links.begin(); it != links.end(); ++it) {
if (!(*it && (*it)->isDerivedFrom(Part::Feature::getClassTypeId()))) {
if (!(*it && (*it)->isDerivedFrom<Part::Feature>())) {
return new App::DocumentObjectExecReturn(
"Linked object is not a Part object (has no Shape).");
}
@@ -202,7 +202,7 @@ std::list<TopoDS_Shape> FeatureAreaView::getShapes()
if (!pObj) {
return shapes;
}
if (!pObj->isDerivedFrom(FeatureArea::getClassTypeId())) {
if (!pObj->isDerivedFrom<FeatureArea>()) {
return shapes;
}
@@ -250,7 +250,7 @@ App::DocumentObjectExecReturn* FeatureAreaView::execute()
return new App::DocumentObjectExecReturn("No shape linked");
}
if (!pObj->isDerivedFrom(FeatureArea::getClassTypeId())) {
if (!pObj->isDerivedFrom<FeatureArea>()) {
return new App::DocumentObjectExecReturn("Linked object is not a FeatureArea");
}