From 665da917f96906d880747a3a49c63a079252e785 Mon Sep 17 00:00:00 2001 From: Alan Garny Date: Thu, 24 Oct 2019 19:44:20 +1300 Subject: [PATCH] Some minor cleaning up. --- .../src/pythonconsolewindow.h | 4 ++-- .../src/webbrowserwindowplugin.cpp | 4 ++-- .../src/webbrowserwindowplugin.h | 6 +++--- .../src/simulationexperimentviewplugin.h | 2 +- .../src/simulationexperimentviewpythonwrapper.h | 3 ++- .../src/simulationsupportpythonwrapper.h | 16 +++++----------- 6 files changed, 15 insertions(+), 20 deletions(-) diff --git a/src/plugins/miscellaneous/PythonConsoleWindow/src/pythonconsolewindow.h b/src/plugins/miscellaneous/PythonConsoleWindow/src/pythonconsolewindow.h index dfd1f86e0a..ba96ead93f 100644 --- a/src/plugins/miscellaneous/PythonConsoleWindow/src/pythonconsolewindow.h +++ b/src/plugins/miscellaneous/PythonConsoleWindow/src/pythonconsolewindow.h @@ -36,7 +36,7 @@ along with this program. If not, see . namespace Ui { class PythonConsoleWindow; -} +} // namespace Ui //============================================================================== @@ -51,7 +51,7 @@ Q_OBJECT public: explicit PythonConsoleWindow(QWidget *pParent); - ~PythonConsoleWindow(); + ~PythonConsoleWindow() override; private: Ui::PythonConsoleWindow *mGui; diff --git a/src/plugins/miscellaneous/WebBrowserWindow/src/webbrowserwindowplugin.cpp b/src/plugins/miscellaneous/WebBrowserWindow/src/webbrowserwindowplugin.cpp index 162dad88f7..61b71dcb14 100644 --- a/src/plugins/miscellaneous/WebBrowserWindow/src/webbrowserwindowplugin.cpp +++ b/src/plugins/miscellaneous/WebBrowserWindow/src/webbrowserwindowplugin.cpp @@ -203,7 +203,7 @@ void WebBrowserWindowPlugin::registerPythonClasses(PyObject *pModule) // Plugin specific //============================================================================== -WebBrowserWindowPlugin * WebBrowserWindowPlugin::instance(void) +WebBrowserWindowPlugin * WebBrowserWindowPlugin::instance() { // Return the 'global' instance of our plugin @@ -216,7 +216,7 @@ WebBrowserWindowPlugin * WebBrowserWindowPlugin::instance(void) //============================================================================== -WebBrowserWindowWidget * WebBrowserWindowPlugin::browserWidget(void) const +WebBrowserWindowWidget * WebBrowserWindowPlugin::browserWidget() const { // Return our Web Browser widget diff --git a/src/plugins/miscellaneous/WebBrowserWindow/src/webbrowserwindowplugin.h b/src/plugins/miscellaneous/WebBrowserWindow/src/webbrowserwindowplugin.h index d4946a5df7..9f6f2d085b 100644 --- a/src/plugins/miscellaneous/WebBrowserWindow/src/webbrowserwindowplugin.h +++ b/src/plugins/miscellaneous/WebBrowserWindow/src/webbrowserwindowplugin.h @@ -71,10 +71,10 @@ class WebBrowserWindowPlugin : public QObject, public I18nInterface, WebBrowserWindowWidget * browserWidget() const; private: - QAction *mWebBrowserWindowAction; + QAction *mWebBrowserWindowAction = nullptr; - WebBrowserWindowWidget *mWebBrowserWindowWidget; - WebBrowserWindowWindow *mWebBrowserWindowWindow; + WebBrowserWindowWidget *mWebBrowserWindowWidget = nullptr; + WebBrowserWindowWindow *mWebBrowserWindowWindow = nullptr; }; //============================================================================== diff --git a/src/plugins/simulation/SimulationExperimentView/src/simulationexperimentviewplugin.h b/src/plugins/simulation/SimulationExperimentView/src/simulationexperimentviewplugin.h index f47bc8a822..76ca17ca2e 100644 --- a/src/plugins/simulation/SimulationExperimentView/src/simulationexperimentviewplugin.h +++ b/src/plugins/simulation/SimulationExperimentView/src/simulationexperimentviewplugin.h @@ -80,7 +80,7 @@ class SimulationExperimentViewPlugin : public QObject, SimulationExperimentViewWidget * viewWidget() const; private: - SimulationExperimentViewWidget *mViewWidget; + SimulationExperimentViewWidget *mViewWidget = nullptr; }; //============================================================================== diff --git a/src/plugins/simulation/SimulationExperimentView/src/simulationexperimentviewpythonwrapper.h b/src/plugins/simulation/SimulationExperimentView/src/simulationexperimentviewpythonwrapper.h index 97d13b0012..1b313d8e8c 100644 --- a/src/plugins/simulation/SimulationExperimentView/src/simulationexperimentviewpythonwrapper.h +++ b/src/plugins/simulation/SimulationExperimentView/src/simulationexperimentviewpythonwrapper.h @@ -48,7 +48,8 @@ class SimulationExperimentViewPythonWrapper : public QObject Q_OBJECT public: - explicit SimulationExperimentViewPythonWrapper(PyObject *pModule, QObject *pParent=0); + explicit SimulationExperimentViewPythonWrapper(PyObject *pModule, + QObject *pParent = nullptr); }; //============================================================================== diff --git a/src/plugins/support/SimulationSupport/src/simulationsupportpythonwrapper.h b/src/plugins/support/SimulationSupport/src/simulationsupportpythonwrapper.h index d711b418c9..54cbb83d3c 100644 --- a/src/plugins/support/SimulationSupport/src/simulationsupportpythonwrapper.h +++ b/src/plugins/support/SimulationSupport/src/simulationsupportpythonwrapper.h @@ -42,7 +42,7 @@ namespace OpenCOR { namespace DataStore { class DataStoreVariable; -} +} // namespace DataStore //============================================================================== @@ -60,17 +60,11 @@ class SimulationResults; // to create a function object to be called when simulation parameters are updated #if defined(_MSC_VER) - #if _MSC_VER > 1900 - // Visual Studio 2017 - typedef std::_Binder SimulationDataUpdatedFunction; - #else - // Visual Studio 2015 - typedef std::_Binder SimulationDataUpdatedFunction; - #endif + using SimulationDataUpdatedFunction = std::_Binder; #elif defined(__APPLE__) - typedef std::__bind SimulationDataUpdatedFunction; + using SimulationDataUpdatedFunction = std::__bind; #else - typedef std::_Bind_helper::type SimulationDataUpdatedFunction; + using SimulationDataUpdatedFunction = std::_Bind_helper::type; #endif //============================================================================== @@ -131,7 +125,7 @@ public slots: // Access a simulation's sensitivity gradients - PyObject * gradients(OpenCOR::SimulationSupport::SimulationResults *pSimulationData) const; + PyObject * gradients(OpenCOR::SimulationSupport::SimulationResults *pSimulationResults) const; private slots: void error(const QString &pErrorMessage);