From f14f952c8347470927879285dbd261b7db8aea98 Mon Sep 17 00:00:00 2001 From: wmayer Date: Tue, 8 Feb 2022 16:26:07 +0100 Subject: [PATCH] Gui: modernize C++11 * remove redundant void-arg * use nullptr --- src/Gui/SoFCColorBar.cpp | 10 +++++----- src/Gui/SoFCColorBar.h | 20 ++++++++++---------- src/Gui/SoFCColorGradient.cpp | 2 +- src/Gui/SoFCColorGradient.h | 10 +++++----- src/Gui/SoFCColorLegend.cpp | 2 +- src/Gui/SoFCColorLegend.h | 12 ++++++------ 6 files changed, 28 insertions(+), 28 deletions(-) diff --git a/src/Gui/SoFCColorBar.cpp b/src/Gui/SoFCColorBar.cpp index 4b80c9ac94..4cef34447f 100644 --- a/src/Gui/SoFCColorBar.cpp +++ b/src/Gui/SoFCColorBar.cpp @@ -56,7 +56,7 @@ SoFCColorBarBase::~SoFCColorBarBase() } // doc from parent -void SoFCColorBarBase::initClass(void) +void SoFCColorBarBase::initClass() { SO_NODE_INIT_ABSTRACT_CLASS(SoFCColorBarBase,SoSeparator,"Separator"); } @@ -85,7 +85,7 @@ class SoFCColorBarProxyObject : public QObject { public: SoFCColorBarProxyObject(SoFCColorBar* b) - : QObject(0), bar(b) {} + : QObject(nullptr), bar(b) {} ~SoFCColorBarProxyObject() {} void customEvent(QEvent *) { @@ -137,7 +137,7 @@ SoFCColorBar::~SoFCColorBar() } // doc from parent -void SoFCColorBar::initClass(void) +void SoFCColorBar::initClass() { SO_NODE_INIT_CLASS(SoFCColorBar,SoFCColorBarBase,"Separator"); } @@ -186,12 +186,12 @@ bool SoFCColorBar::isVisible (float fVal) const return this->getActiveBar()->isVisible(fVal); } -float SoFCColorBar::getMinValue (void) const +float SoFCColorBar::getMinValue () const { return this->getActiveBar()->getMinValue(); } -float SoFCColorBar::getMaxValue (void) const +float SoFCColorBar::getMaxValue () const { return this->getActiveBar()->getMaxValue(); } diff --git a/src/Gui/SoFCColorBar.h b/src/Gui/SoFCColorBar.h index c02e3cf891..580c4e401a 100644 --- a/src/Gui/SoFCColorBar.h +++ b/src/Gui/SoFCColorBar.h @@ -50,8 +50,8 @@ class GuiExport SoFCColorBarBase : public SoSeparator, public App::ValueFloatToR SO_NODE_ABSTRACT_HEADER(Gui::SoFCColorBarBase); public: - static void initClass(void); - static void finish(void); + static void initClass(); + static void finish(); virtual void GLRenderBelowPath ( SoGLRenderAction *action ); @@ -86,12 +86,12 @@ public: * * This method must be implemented in subclasses. */ - virtual float getMinValue (void) const = 0; + virtual float getMinValue () const = 0; /** Returns the current maximum of the parameter range. * * This method must be implemented in subclasses. */ - virtual float getMaxValue (void) const = 0; + virtual float getMaxValue () const = 0; /** * Opens a dialog to customize the current settings of the color bar. * Returns true if the settings have been changed, false otherwise. @@ -113,7 +113,7 @@ protected: */ virtual void setViewportSize( const SbVec2s& size ) = 0; - SoFCColorBarBase (void); + SoFCColorBarBase (); virtual ~SoFCColorBarBase (); private: @@ -132,9 +132,9 @@ class GuiExport SoFCColorBar : public SoFCColorBarBase, public Base::Subject