Gui/Mod: replace several reinterpret_cast with static_cast
This commit is contained in:
@@ -951,7 +951,7 @@ void DefineNodesCallback(void* ud, SoEventCallback* n)
|
||||
Gui::WaitCursor wc;
|
||||
|
||||
// When this callback function is invoked we must in either case leave the edit mode
|
||||
Gui::View3DInventorViewer* view = reinterpret_cast<Gui::View3DInventorViewer*>(n->getUserData());
|
||||
Gui::View3DInventorViewer* view = static_cast<Gui::View3DInventorViewer*>(n->getUserData());
|
||||
view->setEditing(false);
|
||||
view->removeEventCallback(SoMouseButtonEvent::getClassTypeId(), DefineNodesCallback, ud);
|
||||
n->setHandled();
|
||||
|
||||
@@ -138,7 +138,7 @@ void TaskCreateNodeSet::DefineNodesCallback(void* ud, SoEventCallback* n)
|
||||
|
||||
|
||||
// When this callback function is invoked we must in either case leave the edit mode
|
||||
Gui::View3DInventorViewer* view = reinterpret_cast<Gui::View3DInventorViewer*>(n->getUserData());
|
||||
Gui::View3DInventorViewer* view = static_cast<Gui::View3DInventorViewer*>(n->getUserData());
|
||||
view->setEditing(false);
|
||||
view->removeEventCallback(SoMouseButtonEvent::getClassTypeId(), DefineNodesCallback, ud);
|
||||
n->setHandled();
|
||||
|
||||
@@ -822,8 +822,8 @@ void TaskPostDataAlongLine::resolutionChanged(int val) {
|
||||
void TaskPostDataAlongLine::pointCallback(void* ud, SoEventCallback* n)
|
||||
{
|
||||
const SoMouseButtonEvent* mbe = static_cast<const SoMouseButtonEvent*>(n->getEvent());
|
||||
Gui::View3DInventorViewer* view = reinterpret_cast<Gui::View3DInventorViewer*>(n->getUserData());
|
||||
PointMarker* pm = reinterpret_cast<PointMarker*>(ud);
|
||||
Gui::View3DInventorViewer* view = static_cast<Gui::View3DInventorViewer*>(n->getUserData());
|
||||
PointMarker* pm = static_cast<PointMarker*>(ud);
|
||||
|
||||
// Mark all incoming mouse button events as handled, especially, to deactivate the selection node
|
||||
n->getAction()->setHandled();
|
||||
@@ -1047,8 +1047,8 @@ void TaskPostDataAtPoint::centerChanged(double) {
|
||||
void TaskPostDataAtPoint::pointCallback(void* ud, SoEventCallback* n)
|
||||
{
|
||||
const SoMouseButtonEvent* mbe = static_cast<const SoMouseButtonEvent*>(n->getEvent());
|
||||
Gui::View3DInventorViewer* view = reinterpret_cast<Gui::View3DInventorViewer*>(n->getUserData());
|
||||
DataMarker* pm = reinterpret_cast<DataMarker*>(ud);
|
||||
Gui::View3DInventorViewer* view = static_cast<Gui::View3DInventorViewer*>(n->getUserData());
|
||||
DataMarker* pm = static_cast<DataMarker*>(ud);
|
||||
|
||||
// Mark all incoming mouse button events as handled, especially, to deactivate the selection node
|
||||
n->getAction()->setHandled();
|
||||
|
||||
@@ -245,7 +245,7 @@ void ViewProviderFemMesh::attach(App::DocumentObject *pcObj)
|
||||
ViewProviderGeometryObject::attach(pcObj);
|
||||
|
||||
// Move 'coords' before the switch
|
||||
//pcRoot->insertChild(pcCoords,pcRoot->findChild(reinterpret_cast<const SoNode*>(pcModeSwitch)));
|
||||
//pcRoot->insertChild(pcCoords,pcRoot->findChild(static_cast<const SoNode*>(pcModeSwitch)));
|
||||
|
||||
// Annotation sets
|
||||
SoGroup* pcAnotRoot = new SoAnnotation();
|
||||
|
||||
@@ -297,9 +297,9 @@ void ViewProviderFemPostFunction::dragStartCallback(void* data, SoDragger*)
|
||||
{
|
||||
// This is called when a manipulator is about to manipulating
|
||||
Gui::Application::Instance->activeDocument()->openCommand(QT_TRANSLATE_NOOP("Command", "Edit Mirror"));
|
||||
reinterpret_cast<ViewProviderFemPostFunction*>(data)->m_isDragging = true;
|
||||
static_cast<ViewProviderFemPostFunction*>(data)->m_isDragging = true;
|
||||
|
||||
ViewProviderFemPostFunction* that = reinterpret_cast<ViewProviderFemPostFunction*>(data);
|
||||
ViewProviderFemPostFunction* that = static_cast<ViewProviderFemPostFunction*>(data);
|
||||
that->m_autoRecompute = FemSettings().getPostAutoRecompute();
|
||||
}
|
||||
|
||||
@@ -308,16 +308,16 @@ void ViewProviderFemPostFunction::dragFinishCallback(void* data, SoDragger*)
|
||||
// This is called when a manipulator has done manipulating
|
||||
Gui::Application::Instance->activeDocument()->commitCommand();
|
||||
|
||||
ViewProviderFemPostFunction* that = reinterpret_cast<ViewProviderFemPostFunction*>(data);
|
||||
ViewProviderFemPostFunction* that = static_cast<ViewProviderFemPostFunction*>(data);
|
||||
if (that->m_autoRecompute)
|
||||
that->getObject()->getDocument()->recompute();
|
||||
|
||||
reinterpret_cast<ViewProviderFemPostFunction*>(data)->m_isDragging = false;
|
||||
static_cast<ViewProviderFemPostFunction*>(data)->m_isDragging = false;
|
||||
}
|
||||
|
||||
void ViewProviderFemPostFunction::dragMotionCallback(void* data, SoDragger* drag)
|
||||
{
|
||||
ViewProviderFemPostFunction* that = reinterpret_cast<ViewProviderFemPostFunction*>(data);
|
||||
ViewProviderFemPostFunction* that = static_cast<ViewProviderFemPostFunction*>(data);
|
||||
that->draggerUpdate(drag);
|
||||
|
||||
if (that->m_autoRecompute)
|
||||
|
||||
Reference in New Issue
Block a user