From 40c79f18e4d63c86fa865c43f0276ee1cff00abb Mon Sep 17 00:00:00 2001 From: wmayer Date: Wed, 21 Sep 2016 22:14:09 +0200 Subject: [PATCH] fix msvc problems --- src/Gui/SoFCBoundingBox.cpp | 4 ++-- src/Gui/ViewProvider.cpp | 26 ++++++++++++++++++++++++++ src/Gui/ViewProvider.h | 21 +++------------------ src/Gui/WidgetFactory.cpp | 2 +- 4 files changed, 32 insertions(+), 21 deletions(-) diff --git a/src/Gui/SoFCBoundingBox.cpp b/src/Gui/SoFCBoundingBox.cpp index 728ff9b46..f640ab3c5 100644 --- a/src/Gui/SoFCBoundingBox.cpp +++ b/src/Gui/SoFCBoundingBox.cpp @@ -218,11 +218,11 @@ void SoFCBoundingBox::GLRender (SoGLRenderAction *action) state->pop(); } -void SoFCBoundingBox::generatePrimitives (SoAction */*action*/) +void SoFCBoundingBox::generatePrimitives (SoAction * /*action*/) { } -void SoFCBoundingBox::computeBBox (SoAction */*action*/, SbBox3f &box, SbVec3f ¢er) +void SoFCBoundingBox::computeBBox (SoAction * /*action*/, SbBox3f &box, SbVec3f ¢er) { center = (minBounds.getValue() + maxBounds.getValue()) / 2.0f; box.setBounds(minBounds.getValue(), maxBounds.getValue()); diff --git a/src/Gui/ViewProvider.cpp b/src/Gui/ViewProvider.cpp index 8d3bca186..d38443b08 100644 --- a/src/Gui/ViewProvider.cpp +++ b/src/Gui/ViewProvider.cpp @@ -474,3 +474,29 @@ std::vector ViewProvider::getModelPoints(const SoPickedPoint* pp pts.push_back(Base::Vector3d(vec[0],vec[1],vec[2])); return pts; } + +bool ViewProvider::keyPressed(bool pressed, int key) +{ + (void)pressed; + (void)key; + return false; +} + +bool ViewProvider::mouseMove(const SbVec2s &cursorPos, + View3DInventorViewer* viewer) +{ + (void)cursorPos; + (void)viewer; + return false; +} + +bool ViewProvider::mouseButtonPressed(int button, bool pressed, + const SbVec2s &cursorPos, + const View3DInventorViewer* viewer) +{ + (void)button; + (void)pressed; + (void)cursorPos; + (void)viewer; + return false; +} diff --git a/src/Gui/ViewProvider.h b/src/Gui/ViewProvider.h index be1dcb28a..5356a969b 100644 --- a/src/Gui/ViewProvider.h +++ b/src/Gui/ViewProvider.h @@ -290,29 +290,14 @@ public: //@} /// is called when the provider is in edit and a key event occurs. Only ESC ends edit. - virtual bool keyPressed(bool pressed, int key) { - (void)pressed; - (void)key; - return false; - } + virtual bool keyPressed(bool pressed, int key); /// is called by the tree if the user double click on the object virtual bool doubleClicked(void) { return false; } /// is called when the provider is in edit and the mouse is moved - virtual bool mouseMove(const SbVec2s &cursorPos, - View3DInventorViewer* viewer) { - (void)cursorPos; - (void)viewer; - return false; - } + virtual bool mouseMove(const SbVec2s &cursorPos, View3DInventorViewer* viewer); /// is called when the Provider is in edit and the mouse is clicked virtual bool mouseButtonPressed(int button, bool pressed, const SbVec2s &cursorPos, - const View3DInventorViewer* viewer) { - (void)button; - (void)pressed; - (void)cursorPos; - (void)viewer; - return false; - } + const View3DInventorViewer* viewer); /// set up the context-menu with the supported edit modes virtual void setupContextMenu(QMenu*, QObject*, const char*) {} diff --git a/src/Gui/WidgetFactory.cpp b/src/Gui/WidgetFactory.cpp index 9edd0d381..b17277950 100644 --- a/src/Gui/WidgetFactory.cpp +++ b/src/Gui/WidgetFactory.cpp @@ -560,7 +560,7 @@ QWidget* UiLoader::createWidget(const QString & className, QWidget * parent, // ---------------------------------------------------- -PyObject *UiLoaderPy::PyMake(struct _typeobject */*type*/, PyObject * args, PyObject * /*kwds*/) +PyObject *UiLoaderPy::PyMake(struct _typeobject * /*type*/, PyObject * args, PyObject * /*kwds*/) { if (!PyArg_ParseTuple(args, "")) return 0;