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

@@ -129,11 +129,11 @@ std::vector<App::DocumentObject*> DrawViewClip::getViews() const
std::vector<App::DocumentObject*> views = Views.getValues();
std::vector<App::DocumentObject*> allViews;
for (auto& v : views) {
if (v->isDerivedFrom(App::Link::getClassTypeId())) {
if (v->isDerivedFrom<App::Link>()) {
v = static_cast<App::Link*>(v)->getLinkedObject();
}
if (!v->isDerivedFrom(DrawView::getClassTypeId())) {
if (!v->isDerivedFrom<DrawView>()) {
continue;
}