diff --git a/src/Mod/Surface/App/Blending/BlendCurve.cpp b/src/Mod/Surface/App/Blending/BlendCurve.cpp index b03a2a3061..7af7a67ab0 100644 --- a/src/Mod/Surface/App/Blending/BlendCurve.cpp +++ b/src/Mod/Surface/App/Blending/BlendCurve.cpp @@ -47,9 +47,11 @@ BlendCurve::BlendCurve(const std::vector& blendPointsList) if (nb_pts > 2) { throw Base::NotImplementedError("Not implemented"); } - else if (nb_pts < 2) { + + if (nb_pts < 2) { throw Base::ValueError("Need two points for working"); } + blendPoints = blendPointsList; } diff --git a/src/Mod/Surface/App/Blending/BlendCurve.h b/src/Mod/Surface/App/Blending/BlendCurve.h index b73c871e6e..f3da60cf3b 100644 --- a/src/Mod/Surface/App/Blending/BlendCurve.h +++ b/src/Mod/Surface/App/Blending/BlendCurve.h @@ -42,7 +42,7 @@ public: * Constructor *\param std::vector */ - BlendCurve(const std::vector& blendPointsList); + explicit BlendCurve(const std::vector& blendPointsList); ~BlendCurve() = default; /*! * Perform the interpolate algorithm diff --git a/src/Mod/Surface/App/Blending/BlendPoint.h b/src/Mod/Surface/App/Blending/BlendPoint.h index d775897b01..20b12706a0 100644 --- a/src/Mod/Surface/App/Blending/BlendPoint.h +++ b/src/Mod/Surface/App/Blending/BlendPoint.h @@ -33,9 +33,9 @@ namespace Surface { /*! -* Create a list of vectors formed by a point and some derivatives +* Create a list of vectors formed by a point and some derivatives * obtained from a curve or surface -*/ +*/ class SurfaceExport BlendPoint { public: @@ -46,7 +46,7 @@ public: * Constructor *\param std::vector */ - BlendPoint(const std::vector& vectorList); + explicit BlendPoint(const std::vector& vectorList); ~BlendPoint() = default; /*! * Scale the blendpoint vectors diff --git a/src/Mod/Surface/Gui/Command.cpp b/src/Mod/Surface/Gui/Command.cpp index 9a89a24811..c163af04fd 100644 --- a/src/Mod/Surface/Gui/Command.cpp +++ b/src/Mod/Surface/Gui/Command.cpp @@ -212,8 +212,8 @@ CmdSurfaceCurveOnMesh::CmdSurfaceCurveOnMesh() void CmdSurfaceCurveOnMesh::activated(int) { - doCommand(Doc,"import MeshPartGui, FreeCADGui\n" - "FreeCADGui.runCommand('MeshPart_CurveOnMesh')\n"); + doCommand(Doc, "import MeshPartGui, FreeCADGui\n" + "FreeCADGui.runCommand('MeshPart_CurveOnMesh')\n"); } bool CmdSurfaceCurveOnMesh::isActive() @@ -367,7 +367,7 @@ void CmdSurfaceExtendFace::activated(int) std::string FeatName = getUniqueObjectName("Surface"); std::string supportString = faceFilter.Result[0][0].getAsPropertyLinkSubString(); doCommand(Doc, "App.ActiveDocument.addObject(\"Surface::Extend\",\"%s\")", FeatName.c_str()); - doCommand(Doc, "App.ActiveDocument.%s.Face = %s",FeatName.c_str(),supportString.c_str()); + doCommand(Doc, "App.ActiveDocument.%s.Face = %s", FeatName.c_str(), supportString.c_str()); updateActive(); commitCommand(); }