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

@@ -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;