Skip to content

Commit

Permalink
Merge pull request #511 from j-lorrey/230_cppcheck
Browse files Browse the repository at this point in the history
[#230] Remove explicit constructor cppcheck suppression
  • Loading branch information
jmarrec authored May 5, 2022
2 parents 746accf + 3259b80 commit 600a96e
Show file tree
Hide file tree
Showing 74 changed files with 157 additions and 151 deletions.
1 change: 0 additions & 1 deletion .github/workflows/cppcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ jobs:
shell: bash
run: |
cppcheck \
--suppress=noExplicitConstructor \
--suppress=useStlAlgorithm \
--inline-suppr \
--inconclusive \
Expand Down
2 changes: 1 addition & 1 deletion src/bimserver/ProjectImporter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class BIMSERVER_API ProjectImporter : public QDialog

public:
/// Default constructor
ProjectImporter(QWidget* parent);
explicit ProjectImporter(QWidget* parent);

/// Start importing IFC workflow
boost::optional<model::Model> run();
Expand Down
2 changes: 1 addition & 1 deletion src/model_editor/BridgeClasses.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class MODELEDITOR_API ComboHighlightBridge : public QObject
Q_OBJECT;

public:
ComboHighlightBridge(QObject* parent);
explicit ComboHighlightBridge(QObject* parent);

QObject* bridgeSender();

Expand Down
2 changes: 1 addition & 1 deletion src/model_editor/IGSpinBoxes.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class MODELEDITOR_API IGSpinBox : public QSpinBox
Q_OBJECT;

public:
IGSpinBox(QWidget* parent);
explicit IGSpinBox(QWidget* parent);

virtual void wheelEvent(QWheelEvent* event) override;

Expand Down
3 changes: 2 additions & 1 deletion src/model_editor/InspectorDialog.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ class MODELEDITOR_API InspectorDialog
InspectorDialog(InspectorDialogClient client = InspectorDialogClient::AllOpenStudio, QWidget* parent = nullptr);

/// create a new dialog for existing model
InspectorDialog(openstudio::model::Model& model, InspectorDialogClient client = InspectorDialogClient::AllOpenStudio, QWidget* parent = nullptr);
explicit InspectorDialog(openstudio::model::Model& model, InspectorDialogClient client = InspectorDialogClient::AllOpenStudio,
QWidget* parent = nullptr);

virtual ~InspectorDialog();

Expand Down
2 changes: 1 addition & 1 deletion src/model_editor/ModalDialogs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class MODELEDITOR_API ModelObjectSelectorDialogWatcher
Q_OBJECT

public:
ModelObjectSelectorDialogWatcher(std::shared_ptr<ModelObjectSelectorDialog> modelObjectSelectorDialog);
explicit ModelObjectSelectorDialogWatcher(std::shared_ptr<ModelObjectSelectorDialog> modelObjectSelectorDialog);

/// get the selected object
boost::optional<openstudio::model::ModelObject> selectedModelObject() const;
Expand Down
2 changes: 1 addition & 1 deletion src/model_editor/OSProgressBar.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class OSProgressBar : public openstudio::ProgressBar
OSProgressBar(QWidget* parent = nullptr);

/// constructor
OSProgressBar(bool visible, QWidget* parent = nullptr);
explicit OSProgressBar(bool visible, QWidget* parent = nullptr);

/// virtual destructor
virtual ~OSProgressBar();
Expand Down
2 changes: 1 addition & 1 deletion src/model_editor/PathWatcher.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class MODELEDITOR_API PathWatcher : public QObject
/// if path is not a directory it is assumed to be a regular file which may or may not exist at construction,
/// a timer is used to periodically check for changes to the file
/// msec is the timer delay to check for updates to the file, msec does not apply if the path is a directory
PathWatcher(const openstudio::path& p, int msec = 1000);
explicit PathWatcher(const openstudio::path& p, int msec = 1000);

/// virtual destructor
virtual ~PathWatcher();
Expand Down
2 changes: 1 addition & 1 deletion src/model_editor/test/PathWatcher_GTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ struct TestPathWatcher : public PathWatcher
{

// set periodic timer to 1 ms
TestPathWatcher(const openstudio::path& path) : PathWatcher(path, 1), added(false), changed(false), removed(false) {}
explicit TestPathWatcher(const openstudio::path& path) : PathWatcher(path, 1), added(false), changed(false), removed(false) {}

virtual void onPathAdded() override {
added = true;
Expand Down
2 changes: 1 addition & 1 deletion src/openstudio_app/ExternalToolsDialog.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class ExternalToolsDialog : public QDialog
Q_OBJECT

public:
ExternalToolsDialog(openstudio::path t_dviewPath);
explicit ExternalToolsDialog(openstudio::path t_dviewPath);

virtual ~ExternalToolsDialog(){};

Expand Down
2 changes: 1 addition & 1 deletion src/openstudio_lib/CollapsibleInspector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class CollapsibleInspectorHeader : public QAbstractButton
Q_OBJECT

public:
CollapsibleInspectorHeader(QString text, QWidget* parent = nullptr);
explicit CollapsibleInspectorHeader(QString text, QWidget* parent = nullptr);

void setChecked(bool isChecked);

Expand Down
2 changes: 1 addition & 1 deletion src/openstudio_lib/ConstructionObjectVectorController.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class ConstructionObjectVectorController : public ModelObjectVectorController
Q_OBJECT

public:
ConstructionObjectVectorController(QWidget* parentWidget);
explicit ConstructionObjectVectorController(QWidget* parentWidget);

// Need to delete the QMutex
virtual ~ConstructionObjectVectorController();
Expand Down
2 changes: 1 addition & 1 deletion src/openstudio_lib/DefaultConstructionSetInspectorView.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ class DefaultConstructionSetInspectorView : public ModelObjectInspectorView
Q_OBJECT

public:
DefaultConstructionSetInspectorView(const model::Model& model, QWidget* parent = nullptr);
explicit DefaultConstructionSetInspectorView(const model::Model& model, QWidget* parent = nullptr);
virtual ~DefaultConstructionSetInspectorView() {}

protected:
Expand Down
2 changes: 1 addition & 1 deletion src/openstudio_lib/DefaultConstructionSetsController.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class DefaultConstructionSetsController : public ModelSubTabController
Q_OBJECT

public:
DefaultConstructionSetsController(const model::Model& model);
explicit DefaultConstructionSetsController(const model::Model& model);

virtual ~DefaultConstructionSetsController();

Expand Down
2 changes: 1 addition & 1 deletion src/openstudio_lib/EMSInspectorView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class EMSInspectorHeader : public QWidget
{

public:
EMSInspectorHeader(const QString& text) : QWidget() {
explicit EMSInspectorHeader(const QString& text) : QWidget() {
setContentsMargins(0, 0, 0, 0);
setObjectName("IGHeader");
auto layout = new QVBoxLayout();
Expand Down
2 changes: 1 addition & 1 deletion src/openstudio_lib/GeometryEditorView.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class DebugWebView : public QDialog
Q_OBJECT;

public:
DebugWebView(const QString& debugPort, QWidget* parent = nullptr);
explicit DebugWebView(const QString& debugPort, QWidget* parent = nullptr);
virtual ~DebugWebView();

private:
Expand Down
2 changes: 1 addition & 1 deletion src/openstudio_lib/GridItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2537,7 +2537,7 @@ void SplitterItem::setTerminalTypes(std::vector<SplitterItem::TerminalType> type
// A Predicate that returns true on either m_type or DualDuct
struct Predicate
{
Predicate(TerminalType type) : m_type(type) {}
explicit Predicate(TerminalType type) : m_type(type) {}

bool operator()(TerminalType t_type) const {
if ((t_type == m_type) || (t_type == TerminalType::DualDuct)) {
Expand Down
14 changes: 7 additions & 7 deletions src/openstudio_lib/GridItem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ class NodeContextButtonItem : public ButtonItem
Q_OBJECT;

public:
NodeContextButtonItem(GridItem* parent);
explicit NodeContextButtonItem(GridItem* parent);

signals:

Expand Down Expand Up @@ -326,7 +326,7 @@ class OneThreeDualDuctMixerItem : public GridItem
class SupplyPlenumItem : public GridItem
{
public:
SupplyPlenumItem(const model::ModelObject& modelObject, QGraphicsItem* parent = nullptr);
explicit SupplyPlenumItem(const model::ModelObject& modelObject, QGraphicsItem* parent = nullptr);

void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = nullptr) override;

Expand All @@ -339,7 +339,7 @@ class SupplyPlenumItem : public GridItem
class ReturnPlenumItem : public GridItem
{
public:
ReturnPlenumItem(const model::ModelObject& modelObject, QGraphicsItem* parent = nullptr);
explicit ReturnPlenumItem(const model::ModelObject& modelObject, QGraphicsItem* parent = nullptr);

void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = nullptr) override;

Expand Down Expand Up @@ -648,7 +648,7 @@ class HorizontalBranchItem : public GridItem
{
public:
// Dual duct means there will be two parallel paths within one item
HorizontalBranchItem(const std::vector<model::ModelObject>& modelObjects, QGraphicsItem* parent = nullptr, bool dualDuct = false);
explicit HorizontalBranchItem(const std::vector<model::ModelObject>& modelObjects, QGraphicsItem* parent = nullptr, bool dualDuct = false);

// This signature is always used on a dual duct
// modelObjectsBeforeTerminal is what it says, the outer pair for the two parallel paths
Expand Down Expand Up @@ -724,7 +724,7 @@ class HorizontalBranchGroupItem : public GridItem
class VerticalBranchItem : public GridItem
{
public:
VerticalBranchItem(std::vector<model::ModelObject> modelObjects, QGraphicsItem* parent = nullptr);
explicit VerticalBranchItem(std::vector<model::ModelObject> modelObjects, QGraphicsItem* parent = nullptr);

void setPadding(unsigned);

Expand All @@ -742,7 +742,7 @@ class VerticalBranchItem : public GridItem
class ReverseVerticalBranchItem : public GridItem
{
public:
ReverseVerticalBranchItem(std::vector<model::ModelObject> modelObjects, QGraphicsItem* parent = nullptr);
explicit ReverseVerticalBranchItem(std::vector<model::ModelObject> modelObjects, QGraphicsItem* parent = nullptr);

void setPadding(unsigned);

Expand Down Expand Up @@ -837,7 +837,7 @@ class DemandSideItem : public GridItem
class OASystemItem : public GridItem
{
public:
OASystemItem(model::AirLoopHVACOutdoorAirSystem& oaSystem, QGraphicsItem* parent = nullptr);
explicit OASystemItem(model::AirLoopHVACOutdoorAirSystem& oaSystem, QGraphicsItem* parent = nullptr);

protected:
void layout();
Expand Down
4 changes: 2 additions & 2 deletions src/openstudio_lib/HVACSystemsController.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ class HVACControlsController
Q_OBJECT;

public:
HVACControlsController(HVACSystemsController* hvacSystemsController);
explicit HVACControlsController(HVACSystemsController* hvacSystemsController);

virtual ~HVACControlsController();

Expand Down Expand Up @@ -273,7 +273,7 @@ class HVACLayoutController
Q_OBJECT;

public:
HVACLayoutController(HVACSystemsController* hvacSystemsController);
explicit HVACLayoutController(HVACSystemsController* hvacSystemsController);

virtual ~HVACLayoutController();

Expand Down
2 changes: 1 addition & 1 deletion src/openstudio_lib/HVACTemplateHelperDialog.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class HVACTemplateHelperDialog : public QDialog
Q_OBJECT;

public:
HVACTemplateHelperDialog(const model::Model& model, QWidget* parent = nullptr);
explicit HVACTemplateHelperDialog(const model::Model& model, QWidget* parent = nullptr);

virtual ~HVACTemplateHelperDialog() {}

Expand Down
2 changes: 1 addition & 1 deletion src/openstudio_lib/LifeCycleCostsTabView.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class LifeCycleCostsView : public QWidget
Q_OBJECT

public:
LifeCycleCostsView(const model::Model& model);
explicit LifeCycleCostsView(const model::Model& model);

virtual ~LifeCycleCostsView();

Expand Down
2 changes: 1 addition & 1 deletion src/openstudio_lib/LoopChooserView.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class LoopChooserItem : public QWidget
Q_OBJECT;

public:
LoopChooserItem(model::Loop&, LoopChooserView* parent = nullptr);
explicit LoopChooserItem(model::Loop&, LoopChooserView* parent = nullptr);

virtual ~LoopChooserItem() {}

Expand Down
2 changes: 1 addition & 1 deletion src/openstudio_lib/LoopScene.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class LoopScene : public GridScene
Q_OBJECT

public:
LoopScene(model::Loop loop, QObject* parent = nullptr);
explicit LoopScene(model::Loop loop, QObject* parent = nullptr);

virtual ~LoopScene() {}

Expand Down
2 changes: 1 addition & 1 deletion src/openstudio_lib/MainTabController.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class MainTabController : public OSQObjectController
Q_OBJECT

public:
MainTabController(MainTabView* mainContentWidget);
explicit MainTabController(MainTabView* mainContentWidget);

virtual ~MainTabController();

Expand Down
2 changes: 1 addition & 1 deletion src/openstudio_lib/MainWindow.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class MainWindow : public QMainWindow
Q_OBJECT

public:
MainWindow(bool isPlugin, QWidget* parent = nullptr);
explicit MainWindow(bool isPlugin, QWidget* parent = nullptr);
virtual ~MainWindow() {}

void addVerticalTabButton(int id, QString toolTip, const QString& selectedImagePath, const QString& unSelectedImagePath,
Expand Down
2 changes: 1 addition & 1 deletion src/openstudio_lib/ModelObjectInspectorView.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class DefaultInspectorView : public ModelObjectInspectorView
Q_OBJECT

public:
DefaultInspectorView(const model::Model& model, QWidget* parent = nullptr);
explicit DefaultInspectorView(const model::Model& model, QWidget* parent = nullptr);

virtual ~DefaultInspectorView() {}

Expand Down
Loading

0 comments on commit 600a96e

Please sign in to comment.