diff --git a/src/Mod/Surface/App/AppSurface.cpp b/src/Mod/Surface/App/AppSurface.cpp index e7a87e8f12..22ceb69343 100644 --- a/src/Mod/Surface/App/AppSurface.cpp +++ b/src/Mod/Surface/App/AppSurface.cpp @@ -65,7 +65,7 @@ PyMOD_INIT_FUNC(Surface) } catch(const Base::Exception& e) { PyErr_SetString(PyExc_ImportError, e.what()); - PyMOD_Return(0); + PyMOD_Return(nullptr); } PyObject* mod = Surface::initModule(); diff --git a/src/Mod/Surface/App/FeatureCut.cpp b/src/Mod/Surface/App/FeatureCut.cpp index e950d672aa..7e617e4224 100644 --- a/src/Mod/Surface/App/FeatureCut.cpp +++ b/src/Mod/Surface/App/FeatureCut.cpp @@ -43,7 +43,7 @@ PROPERTY_SOURCE(Surface::Cut, Part::Feature) Cut::Cut() { - ADD_PROPERTY(ShapeList,(0,"TopoDS_Shape")); + ADD_PROPERTY(ShapeList,(nullptr,"TopoDS_Shape")); ShapeList.setScope(App::LinkScope::Global); } @@ -95,7 +95,7 @@ App::DocumentObjectExecReturn *Cut::execute(void) } this->Shape.setValue(aCutShape); - return 0; + return nullptr; } catch (Standard_Failure& e) { diff --git a/src/Mod/Surface/App/FeatureExtend.cpp b/src/Mod/Surface/App/FeatureExtend.cpp index 389ea9986d..67cf6c9a92 100644 --- a/src/Mod/Surface/App/FeatureExtend.cpp +++ b/src/Mod/Surface/App/FeatureExtend.cpp @@ -48,7 +48,7 @@ PROPERTY_SOURCE(Surface::Extend, Part::Spline) Extend::Extend() : lockOnChangeMutex(false) { - ADD_PROPERTY(Face,(0)); + ADD_PROPERTY(Face,(nullptr)); Face.setScope(App::LinkScope::Global); ADD_PROPERTY(Tolerance, (0.1)); Tolerance.setConstraints(&ToleranceRange); diff --git a/src/Mod/Surface/App/FeatureFilling.cpp b/src/Mod/Surface/App/FeatureFilling.cpp index d0b17c2362..946bcaea43 100644 --- a/src/Mod/Surface/App/FeatureFilling.cpp +++ b/src/Mod/Surface/App/FeatureFilling.cpp @@ -47,19 +47,19 @@ PROPERTY_SOURCE(Surface::Filling, Part::Spline) Filling::Filling() { - ADD_PROPERTY_TYPE(BoundaryEdges,(0,""), "Filling", App::Prop_None, "Boundary Edges (C0 is required for edges without a corresponding face)"); + ADD_PROPERTY_TYPE(BoundaryEdges,(nullptr,""), "Filling", App::Prop_None, "Boundary Edges (C0 is required for edges without a corresponding face)"); ADD_PROPERTY_TYPE(BoundaryFaces,(""), "Filling", App::Prop_None, "Boundary Faces"); ADD_PROPERTY_TYPE(BoundaryOrder,(-1), "Filling", App::Prop_None, "Order of constraint on boundary faces (C0, G1 and G2 are possible)"); - ADD_PROPERTY_TYPE(UnboundEdges,(0,""), "Filling", App::Prop_None, "Unbound constraint edges (C0 is required for edges without a corresponding face)"); + ADD_PROPERTY_TYPE(UnboundEdges,(nullptr,""), "Filling", App::Prop_None, "Unbound constraint edges (C0 is required for edges without a corresponding face)"); ADD_PROPERTY_TYPE(UnboundFaces,(""), "Filling", App::Prop_None, "Unbound constraint faces"); ADD_PROPERTY_TYPE(UnboundOrder,(-1), "Filling", App::Prop_None, "Order of constraint on curve faces (C0, G1 and G2 are possible)"); - ADD_PROPERTY_TYPE(FreeFaces,(0,""), "Filling", App::Prop_None, "Free constraint on a face"); + ADD_PROPERTY_TYPE(FreeFaces,(nullptr,""), "Filling", App::Prop_None, "Free constraint on a face"); ADD_PROPERTY_TYPE(FreeOrder,(0), "Filling", App::Prop_None, "Order of constraint on free faces"); - ADD_PROPERTY_TYPE(Points,(0,""), "Filling", App::Prop_None, "Constraint Points (on Surface)"); - ADD_PROPERTY_TYPE(InitialFace,(0), "Filling", App::Prop_None, "Initial surface to use"); + ADD_PROPERTY_TYPE(Points,(nullptr,""), "Filling", App::Prop_None, "Constraint Points (on Surface)"); + ADD_PROPERTY_TYPE(InitialFace,(nullptr), "Filling", App::Prop_None, "Initial surface to use"); ADD_PROPERTY_TYPE(Degree,(3), "Filling", App::Prop_None, "Starting degree"); ADD_PROPERTY_TYPE(PointsOnCurve,(15), "Filling", App::Prop_None, "Number of points on an edge for constraint"); diff --git a/src/Mod/Surface/App/FeatureGeomFillSurface.cpp b/src/Mod/Surface/App/FeatureGeomFillSurface.cpp index 8bad1eba8c..4ccddc1635 100644 --- a/src/Mod/Surface/App/FeatureGeomFillSurface.cpp +++ b/src/Mod/Surface/App/FeatureGeomFillSurface.cpp @@ -94,7 +94,7 @@ void ShapeValidator::checkEdge(const TopoDS_Shape& shape) void ShapeValidator::checkAndAdd(const TopoDS_Shape &shape, Handle(ShapeExtend_WireData) *aWD) { checkEdge(shape); - if (aWD != NULL) { + if (aWD != nullptr) { BRepBuilderAPI_Copy copier(shape); // make a copy of the shape and the underlying geometry to avoid to affect the input shapes (*aWD)->Add(TopoDS::Edge(copier.Shape())); @@ -104,7 +104,7 @@ void ShapeValidator::checkAndAdd(const TopoDS_Shape &shape, Handle(ShapeExtend_W void ShapeValidator::checkAndAdd(const Part::TopoShape &ts, const char *subName, Handle(ShapeExtend_WireData) *aWD) { try { - if (subName != NULL && *subName != '\0') { + if (subName != nullptr && *subName != '\0') { //we want only the subshape which is linked checkAndAdd(ts.getSubShape(subName), aWD); } @@ -126,12 +126,12 @@ void ShapeValidator::checkAndAdd(const Part::TopoShape &ts, const char *subName, PROPERTY_SOURCE(Surface::GeomFillSurface, Part::Spline) -const char* GeomFillSurface::FillTypeEnums[] = {"Stretched", "Coons", "Curved", NULL}; +const char* GeomFillSurface::FillTypeEnums[] = {"Stretched", "Coons", "Curved", nullptr}; GeomFillSurface::GeomFillSurface(): Spline() { ADD_PROPERTY(FillType, ((long)0)); - ADD_PROPERTY(BoundaryList, (0, "Dummy")); + ADD_PROPERTY(BoundaryList, (nullptr, "Dummy")); ADD_PROPERTY(ReversedList, (false)); FillType.setEnums(FillTypeEnums); BoundaryList.setScope(App::LinkScope::Global); diff --git a/src/Mod/Surface/App/FeatureGeomFillSurface.h b/src/Mod/Surface/App/FeatureGeomFillSurface.h index 905b8e79c5..501d98e9d9 100644 --- a/src/Mod/Surface/App/FeatureGeomFillSurface.h +++ b/src/Mod/Surface/App/FeatureGeomFillSurface.h @@ -46,8 +46,8 @@ public: ShapeValidator(); void initValidator(void); void checkEdge(const TopoDS_Shape& shape); - void checkAndAdd(const TopoDS_Shape &shape, Handle(ShapeExtend_WireData) *aWD = NULL); - void checkAndAdd(const Part::TopoShape &ts, const char *subName, Handle(ShapeExtend_WireData) *aWire = NULL); + void checkAndAdd(const TopoDS_Shape &shape, Handle(ShapeExtend_WireData) *aWD = nullptr); + void checkAndAdd(const Part::TopoShape &ts, const char *subName, Handle(ShapeExtend_WireData) *aWire = nullptr); bool isBezier() const { return willBezier; diff --git a/src/Mod/Surface/App/FeatureSewing.cpp b/src/Mod/Surface/App/FeatureSewing.cpp index c4f278cfba..c9971dd147 100644 --- a/src/Mod/Surface/App/FeatureSewing.cpp +++ b/src/Mod/Surface/App/FeatureSewing.cpp @@ -43,7 +43,7 @@ PROPERTY_SOURCE(Surface::Sewing, Part::Feature) Sewing::Sewing() { - ADD_PROPERTY_TYPE(ShapeList,(0,""), "Sewing", App::Prop_None, "Input shapes"); + ADD_PROPERTY_TYPE(ShapeList,(nullptr,""), "Sewing", App::Prop_None, "Input shapes"); ADD_PROPERTY_TYPE(Tolerance,(Precision::Confusion()), "Sewing", App::Prop_None, "Sewing tolerance"); ADD_PROPERTY_TYPE(SewingOption,(true), "Sewing", App::Prop_None, "Sewing option"); ADD_PROPERTY_TYPE(DegenerateShape,(true), "Sewing", App::Prop_None, "Analysis of degenerated shapes"); diff --git a/src/Mod/Surface/Gui/AppSurfaceGui.cpp b/src/Mod/Surface/Gui/AppSurfaceGui.cpp index 419c8b53f8..90849781c0 100644 --- a/src/Mod/Surface/Gui/AppSurfaceGui.cpp +++ b/src/Mod/Surface/Gui/AppSurfaceGui.cpp @@ -65,7 +65,7 @@ PyMOD_INIT_FUNC(SurfaceGui) { if (!Gui::Application::Instance) { PyErr_SetString(PyExc_ImportError, "Cannot load Gui module in console application."); - PyMOD_Return(0); + PyMOD_Return(nullptr); } Base::Interpreter().runString("import Surface"); diff --git a/src/Mod/Surface/Gui/TaskFilling.cpp b/src/Mod/Surface/Gui/TaskFilling.cpp index ee21ce2bd3..d45e3adba5 100644 --- a/src/Mod/Surface/Gui/TaskFilling.cpp +++ b/src/Mod/Surface/Gui/TaskFilling.cpp @@ -533,7 +533,7 @@ void FillingPanel::on_listBoundary_itemDoubleClicked(QListWidgetItem* item) const TopTools_ListOfShape& adj_faces = edge2Face.FindFromKey(edge); if (adj_faces.Extent() > 0) { int n = adj_faces.Extent(); - ui->statusLabel->setText(tr("Edge has %n adjacent faces", 0, n)); + ui->statusLabel->setText(tr("Edge has %n adjacent faces", nullptr, n)); // fill up the combo boxes modifyBoundary(true); @@ -859,14 +859,14 @@ TaskFilling::TaskFilling(ViewProviderFilling* vp, Surface::Filling* obj) widget1 = new FillingPanel(vp, obj); Gui::TaskView::TaskBox* taskbox1 = new Gui::TaskView::TaskBox( Gui::BitmapFactory().pixmap("Surface_Filling"), - widget1->windowTitle(), true, 0); + widget1->windowTitle(), true, nullptr); taskbox1->groupLayout()->addWidget(widget1); Content.push_back(taskbox1); // second task box widget2 = new FillingEdgePanel(vp, obj); Gui::TaskView::TaskBox* taskbox2 = new Gui::TaskView::TaskBox( - QPixmap(), widget2->windowTitle(), true, 0); + QPixmap(), widget2->windowTitle(), true, nullptr); taskbox2->groupLayout()->addWidget(widget2); Content.push_back(taskbox2); taskbox2->hideGroupBox(); @@ -874,7 +874,7 @@ TaskFilling::TaskFilling(ViewProviderFilling* vp, Surface::Filling* obj) // third task box widget3 = new FillingVertexPanel(vp, obj); Gui::TaskView::TaskBox* taskbox3 = new Gui::TaskView::TaskBox( - QPixmap(), widget3->windowTitle(), true, 0); + QPixmap(), widget3->windowTitle(), true, nullptr); taskbox3->groupLayout()->addWidget(widget3); Content.push_back(taskbox3); taskbox3->hideGroupBox(); diff --git a/src/Mod/Surface/Gui/TaskFillingEdge.cpp b/src/Mod/Surface/Gui/TaskFillingEdge.cpp index 1955892770..f5c34415f6 100644 --- a/src/Mod/Surface/Gui/TaskFillingEdge.cpp +++ b/src/Mod/Surface/Gui/TaskFillingEdge.cpp @@ -330,7 +330,7 @@ void FillingEdgePanel::on_listUnbound_itemDoubleClicked(QListWidgetItem* item) const TopTools_ListOfShape& adj_faces = edge2Face.FindFromKey(edge); if (adj_faces.Extent() > 0) { int n = adj_faces.Extent(); - ui->statusLabel->setText(tr("Edge has %n adjacent face(s)", 0, n)); + ui->statusLabel->setText(tr("Edge has %n adjacent face(s)", nullptr, n)); // fill up the combo boxes modifyBoundary(true); diff --git a/src/Mod/Surface/Gui/TaskGeomFillSurface.cpp b/src/Mod/Surface/Gui/TaskGeomFillSurface.cpp index d36d2d3c8c..ef3b359511 100644 --- a/src/Mod/Surface/Gui/TaskGeomFillSurface.cpp +++ b/src/Mod/Surface/Gui/TaskGeomFillSurface.cpp @@ -587,7 +587,7 @@ TaskGeomFillSurface::TaskGeomFillSurface(ViewProviderGeomFillSurface* vp, Surfac widget->setWindowTitle(QObject::tr("Surface")); taskbox = new Gui::TaskView::TaskBox( Gui::BitmapFactory().pixmap("Surface_BSplineSurface"), - widget->windowTitle(), true, 0); + widget->windowTitle(), true, nullptr); taskbox->groupLayout()->addWidget(widget); Content.push_back(taskbox); } diff --git a/src/Mod/Surface/Gui/TaskSections.cpp b/src/Mod/Surface/Gui/TaskSections.cpp index 6eef1858fd..d1ee741d54 100644 --- a/src/Mod/Surface/Gui/TaskSections.cpp +++ b/src/Mod/Surface/Gui/TaskSections.cpp @@ -555,7 +555,7 @@ TaskSections::TaskSections(ViewProviderSections* vp, Surface::Sections* obj) widget1 = new SectionsPanel(vp, obj); Gui::TaskView::TaskBox* taskbox1 = new Gui::TaskView::TaskBox( Gui::BitmapFactory().pixmap("Surface_Sections"), - widget1->windowTitle(), true, 0); + widget1->windowTitle(), true, nullptr); taskbox1->groupLayout()->addWidget(widget1); Content.push_back(taskbox1); }