PD: modernize C++: use default member init

This commit is contained in:
wmayer
2023-08-22 17:46:48 +02:00
committed by wwmayer
parent 8b8f970b27
commit 5686149cd3
8 changed files with 6 additions and 13 deletions

View File

@@ -43,7 +43,6 @@ namespace PartDesign {
PROPERTY_SOURCE(PartDesign::FeatureAddSub, PartDesign::Feature)
FeatureAddSub::FeatureAddSub()
: addSubType(Additive)
{
ADD_PROPERTY(AddSubShape,(TopoDS_Shape()));
ADD_PROPERTY_TYPE(Refine,(0),"Part Design",(App::PropertyType)(App::Prop_None),"Refine shape (clean up redundant edges) after adding/subtracting");

View File

@@ -52,7 +52,7 @@ public:
App::PropertyBool Refine;
protected:
Type addSubType;
Type addSubType{Additive};
TopoDS_Shape refineShapeIfActive(const TopoDS_Shape&) const;
};

View File

@@ -61,7 +61,6 @@ const App::PropertyQuantityConstraint::Constraints quantityRangeZero = { 0.0, FL
PROPERTY_SOURCE_WITH_EXTENSIONS(PartDesign::FeaturePrimitive, PartDesign::FeatureAddSub)
FeaturePrimitive::FeaturePrimitive()
: primitiveType(Box)
{
Part::AttachExtension::initExtension(this);
}

View File

@@ -634,7 +634,6 @@ private:
SketchWorkflow::SketchWorkflow(Gui::Document* document)
: guidocument(document)
, activeBody(nullptr)
{
appdocument = guidocument->getDocument();
}

View File

@@ -57,7 +57,7 @@ private:
private:
Gui::Document* guidocument;
App::Document* appdocument;
PartDesign::Body* activeBody;
PartDesign::Body* activeBody{nullptr};
};
} // namespace PartDesignGui

View File

@@ -50,7 +50,6 @@ using namespace PartDesignGui;
PROPERTY_SOURCE_WITH_EXTENSIONS(PartDesignGui::ViewProvider, PartGui::ViewProviderPart)
ViewProvider::ViewProvider()
: oldTip(nullptr), isSetTipIcon(false)
{
PartGui::ViewProviderAttachExtension::initExtension(this);
}

View File

@@ -86,8 +86,8 @@ protected:
virtual TaskDlgFeatureParameters *getEditDialog();
std::string oldWb;
App::DocumentObject* oldTip;
bool isSetTipIcon;
App::DocumentObject* oldTip{nullptr};
bool isSetTipIcon{false};
};
using ViewProviderPython = Gui::ViewProviderPythonFeatureT<ViewProvider>;

View File

@@ -35,10 +35,7 @@ class PartDesignGuiExport ViewProviderTransformed : public ViewProvider
PROPERTY_HEADER_WITH_OVERRIDE(PartDesignGui::ViewProviderTransformed);
public:
/// constructor
ViewProviderTransformed()
: pcRejectedRoot(nullptr) {}
/// destructor
ViewProviderTransformed() = default;
~ViewProviderTransformed() override = default;
// The feature name of the subclass
@@ -63,7 +60,7 @@ protected:
bool checkDlgOpen(TaskDlgTransformedParameters* transformedDlg);
// node for the representation of rejected repetitions
SoGroup * pcRejectedRoot;
SoGroup * pcRejectedRoot{nullptr};
QString diagMessage;