Core: modernize type checking

This commit is contained in:
Florian Foinant-Willig
2023-10-15 21:38:48 +02:00
parent 6d8fb68f3b
commit 773c701eec
31 changed files with 110 additions and 110 deletions

View File

@@ -54,12 +54,12 @@ struct TypeData;
\code
void getRightFeature(Base::Base * anode)
{
assert(anode->getTypeId().isDerivedFrom(App::Feature::getClassTypeId()));
assert(anode->isDerivedFrom<App::Feature>());
if (anode->getTypeId() == Mesh::MeshFeature::getClassTypeId()) {
if (anode->is<Mesh::MeshFeature>()) {
// do something..
}
else if (anode->getTypeId() == Part::PartFeature::getClassTypeId()) {
else if (anode->is<Part::PartFeature>()) {
// do something..
}
else {