From 707b9ee4eb420b02ce6311f093a73623e6ee5e43 Mon Sep 17 00:00:00 2001 From: Vasyl Skorych Date: Wed, 19 Jun 2024 21:54:38 +0200 Subject: [PATCH] build: Fix clang warnings --- GUIDialogs/UnitsViewer/PlotsViewer.h | 2 +- GUIDialogs/UnitsViewer/UnitsViewer.h | 4 ++-- Utilities/DisableWarningHelper.h | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/GUIDialogs/UnitsViewer/PlotsViewer.h b/GUIDialogs/UnitsViewer/PlotsViewer.h index 2246484d..fe902b53 100644 --- a/GUIDialogs/UnitsViewer/PlotsViewer.h +++ b/GUIDialogs/UnitsViewer/PlotsViewer.h @@ -54,7 +54,7 @@ class CPlotsViewer public slots: void UpdateWholeView(); - void setVisible( bool _bVisible ); + void setVisible( bool _bVisible ) override; private slots: void SliderPositionChanged( int _nIndex ); diff --git a/GUIDialogs/UnitsViewer/UnitsViewer.h b/GUIDialogs/UnitsViewer/UnitsViewer.h index f6620cb9..4ad1b58f 100644 --- a/GUIDialogs/UnitsViewer/UnitsViewer.h +++ b/GUIDialogs/UnitsViewer/UnitsViewer.h @@ -43,7 +43,7 @@ class CUnitsViewer public: CUnitsViewer(CFlowsheet* _pFlowsheet, CMaterialsDatabase* _materialsDatabase, QWidget* _parent = nullptr, Qt::WindowFlags flags = Qt::WindowFlags()); - ~CUnitsViewer(); + ~CUnitsViewer() override; void SetPointers(CModelsManager* _modelsManager, QSettings* _settings) override; void InitializeConnections(); @@ -71,5 +71,5 @@ private slots: public slots: void UpdateWholeView(); - void setVisible( bool _bVisible ); + void setVisible( bool _bVisible ) override; }; diff --git a/Utilities/DisableWarningHelper.h b/Utilities/DisableWarningHelper.h index 32b81b5b..27b82f91 100644 --- a/Utilities/DisableWarningHelper.h +++ b/Utilities/DisableWarningHelper.h @@ -5,6 +5,10 @@ #define PRAGMA_WARNING_PUSH __pragma(warning(push)) #define PRAGMA_WARNING_POP __pragma(warning(pop)) #define PRAGMA_WARNING_DISABLE __pragma(warning(disable : 4005 4244 4267 4700 ALL_CODE_ANALYSIS_WARNINGS)) +#elif defined(__clang__) +#define PRAGMA_WARNING_PUSH _Pragma("clang diagnostic push") +#define PRAGMA_WARNING_POP _Pragma("clang diagnostic pop") +#define PRAGMA_WARNING_DISABLE _Pragma("clang diagnostic ignored \"-Winconsistent-missing-override\"") #else #define PRAGMA_WARNING_PUSH #define PRAGMA_WARNING_POP