TechDraw: modernize type checking

This commit is contained in:
Florian Foinant-Willig
2023-10-15 21:39:03 +02:00
parent 464ffa7e73
commit 1d8a51b47b
22 changed files with 56 additions and 58 deletions

View File

@@ -127,7 +127,7 @@ std::vector<DrawTileWeld*> DrawWeldSymbol::getTiles() const
}
for(std::vector<App::DocumentObject *>::iterator it = tiles.begin(); it != tiles.end(); it++) {
if ((*it)->getTypeId().isDerivedFrom(TechDraw::DrawTileWeld::getClassTypeId())) {
if ((*it)->isDerivedFrom<TechDraw::DrawTileWeld>()) {
App::DocumentObject* doTemp = (*it);
DrawTileWeld* temp = static_cast<DrawTileWeld*>(doTemp);
result.push_back(temp);