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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user