Assembly: Use freecad_cast whenever possible
This commit is contained in:
committed by
Benjamin Nauck
parent
0e2fd36551
commit
ff99df4c4d
@@ -600,7 +600,7 @@ T* AssemblyObject::getGroup()
|
||||
}
|
||||
for (auto group : groups) {
|
||||
if (hasObject(group)) {
|
||||
return dynamic_cast<T*>(group);
|
||||
return freecad_cast<T*>(group);
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
@@ -621,7 +621,7 @@ ViewGroup* AssemblyObject::getExplodedViewGroup() const
|
||||
}
|
||||
for (auto viewGroup : viewGroups) {
|
||||
if (hasObject(viewGroup)) {
|
||||
return dynamic_cast<ViewGroup*>(viewGroup);
|
||||
return freecad_cast<ViewGroup*>(viewGroup);
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
@@ -1935,7 +1935,7 @@ std::vector<AssemblyLink*> AssemblyObject::getSubAssemblies()
|
||||
doc->getObjectsOfType(Assembly::AssemblyLink::getClassTypeId());
|
||||
for (auto assembly : assemblies) {
|
||||
if (hasObject(assembly)) {
|
||||
subAssemblies.push_back(dynamic_cast<AssemblyLink*>(assembly));
|
||||
subAssemblies.push_back(freecad_cast<AssemblyLink*>(assembly));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user