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 6a3eb2ab49
commit 6f535f19fb
166 changed files with 484 additions and 497 deletions

View File

@@ -136,7 +136,7 @@ void AlignmentGroup::setRandomColor()
float r = /*(float)rand()/(float)RAND_MAX*/0.0f;
float g = (float)rand()/(float)RAND_MAX;
float b = (float)rand()/(float)RAND_MAX;
if ((*it)->isDerivedFrom(Gui::ViewProviderGeometryObject::getClassTypeId())) {
if ((*it)->isDerivedFrom<Gui::ViewProviderGeometryObject>()) {
SoSearchAction searchAction;
searchAction.setType(SoMaterial::getClassTypeId());
searchAction.setInterest(SoSearchAction::FIRST);
@@ -239,7 +239,7 @@ Base::BoundBox3d AlignmentGroup::getBoundingBox() const
Base::BoundBox3d box;
std::vector<Gui::ViewProviderDocumentObject*>::const_iterator it;
for (it = this->_views.begin(); it != this->_views.end(); ++it) {
if ((*it)->isDerivedFrom(Gui::ViewProviderGeometryObject::getClassTypeId())) {
if ((*it)->isDerivedFrom<Gui::ViewProviderGeometryObject>()) {
auto geo = (*it)->getObject<App::GeoFeature>();
const App::PropertyComplexGeoData* prop = geo->getPropertyOfGeometry();
if (prop)