From c38d8479bc283828989dce9aad6d8daff2df8289 Mon Sep 17 00:00:00 2001 From: wmayer Date: Wed, 24 Aug 2022 17:02:17 +0200 Subject: [PATCH] Clang: fix clang-diagnostic-error --- src/Gui/SyntaxHighlighter.h | 1 + src/Mod/Part/App/TopoShape.cpp | 9 ++++++--- src/Mod/Part/Gui/SectionCutting.h | 4 ++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/Gui/SyntaxHighlighter.h b/src/Gui/SyntaxHighlighter.h index a617cda0c4..b510bfcc5d 100644 --- a/src/Gui/SyntaxHighlighter.h +++ b/src/Gui/SyntaxHighlighter.h @@ -25,6 +25,7 @@ #define GUI_SYNTAXHIGHLIGHTER_H #include +#include namespace Gui { class SyntaxHighlighterP; diff --git a/src/Mod/Part/App/TopoShape.cpp b/src/Mod/Part/App/TopoShape.cpp index 9794fb3427..c09c9903df 100644 --- a/src/Mod/Part/App/TopoShape.cpp +++ b/src/Mod/Part/App/TopoShape.cpp @@ -2015,10 +2015,13 @@ TopoDS_Shape TopoShape::makePipeShell(const TopTools_ListOfShape& profiles, mkPipeShell.Add(TopoDS_Shape(it.Value())); } - if (!mkPipeShell.IsReady()) Standard_Failure::Raise("shape is not ready to build"); - else mkPipeShell.Build(); + if (!mkPipeShell.IsReady()) + throw Standard_Failure("shape is not ready to build"); - if (make_solid) mkPipeShell.MakeSolid(); + mkPipeShell.Build(); + + if (make_solid) + mkPipeShell.MakeSolid(); return mkPipeShell.Shape(); } diff --git a/src/Mod/Part/Gui/SectionCutting.h b/src/Mod/Part/Gui/SectionCutting.h index d5c87aacab..81fbd493f1 100644 --- a/src/Mod/Part/Gui/SectionCutting.h +++ b/src/Mod/Part/Gui/SectionCutting.h @@ -23,8 +23,12 @@ #ifndef PARTGUI_SECTIONCUTTING_H #define PARTGUI_SECTIONCUTTING_H +#include #include +#include +class QDoubleSpinBox; +class QSlider; namespace PartGui {