Gui: Use getObject<T>() helpers in classes

This commit is generated using regex based find and replace:

```
s/[\w:]+_cast\s*<([^>]+)\*>\s*\(\s*getObject\(\s*\)\)/getObject<$1>/
s/[\w:]+_cast\s*<([^>]+)\*>\s*\(\s*([^)]*)\s*->\s*getObject\(\s*\)\)/$2->getObject<$1>()/
```

To regenerate if needed.
This commit is contained in:
Kacper Donat
2024-10-27 20:26:31 +01:00
parent deb15a57e4
commit 651cefde4d
131 changed files with 535 additions and 628 deletions

View File

@@ -230,7 +230,7 @@ void MeshFaceAddition::finishEditing()
void MeshFaceAddition::addFace()
{
Mesh::Feature* mf = static_cast<Mesh::Feature*>(faceView->mesh->getObject());
Mesh::Feature* mf = faceView->mesh->getObject<Mesh::Feature>();
App::Document* doc = mf->getDocument();
doc->openTransaction("Add triangle");
Mesh::MeshObject* mesh = mf->Mesh.startEditing();
@@ -290,7 +290,7 @@ void MeshFaceAddition::showMarker(SoPickedPoint* pp)
if (detail) {
if (detail->isOfType(SoFaceDetail::getClassTypeId())) {
const SoFaceDetail* fd = static_cast<const SoFaceDetail*>(detail);
Mesh::Feature* mf = static_cast<Mesh::Feature*>(faceView->mesh->getObject());
Mesh::Feature* mf = faceView->mesh->getObject<Mesh::Feature>();
const MeshCore::MeshFacetArray& facets =
mf->Mesh.getValuePtr()->getKernel().GetFacets();
const MeshCore::MeshPointArray& points =
@@ -485,7 +485,7 @@ MeshFillHole::~MeshFillHole()
void MeshFillHole::startEditing(MeshGui::ViewProviderMesh* vp)
{
this->myMesh = static_cast<Mesh::Feature*>(vp->getObject());
this->myMesh = vp->getObject<Mesh::Feature>();
Gui::View3DInventor* view = static_cast<Gui::View3DInventor*>(parent());
Gui::View3DInventorViewer* viewer = view->getViewer();