Inspection: modernize C++: use default member init
This commit is contained in:
@@ -459,7 +459,6 @@ float InspectNominalPoints::getDistance(const Base::Vector3f& point) const
|
||||
|
||||
InspectNominalShape::InspectNominalShape(const TopoDS_Shape& shape, float /*radius*/)
|
||||
: _rShape(shape)
|
||||
, isSolid(false)
|
||||
{
|
||||
distss = new BRepExtrema_DistShapeShape();
|
||||
distss->LoadS1(_rShape);
|
||||
@@ -717,7 +716,7 @@ struct DistanceInspection
|
||||
// Helper internal class for QtConcurrent map operation. Holds sums-of-squares and counts for RMS calculation
|
||||
class DistanceInspectionRMS {
|
||||
public:
|
||||
DistanceInspectionRMS() : m_numv(0), m_sumsq(0.0) {}
|
||||
DistanceInspectionRMS() = default;
|
||||
DistanceInspectionRMS& operator += (const DistanceInspectionRMS& rhs)
|
||||
{
|
||||
this->m_numv += rhs.m_numv;
|
||||
@@ -730,8 +729,8 @@ public:
|
||||
return 0.0;
|
||||
return sqrt(this->m_sumsq / (double)this->m_numv);
|
||||
}
|
||||
int m_numv;
|
||||
double m_sumsq;
|
||||
int m_numv{0};
|
||||
double m_sumsq{0.0};
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -163,7 +163,7 @@ private:
|
||||
private:
|
||||
BRepExtrema_DistShapeShape* distss;
|
||||
const TopoDS_Shape& _rShape;
|
||||
bool isSolid;
|
||||
bool isSolid{false};
|
||||
};
|
||||
|
||||
class InspectionExport PropertyDistanceList: public App::PropertyLists
|
||||
|
||||
@@ -68,7 +68,7 @@ App::PropertyFloatConstraint::Constraints ViewProviderInspection::floatRange = {
|
||||
|
||||
PROPERTY_SOURCE(InspectionGui::ViewProviderInspection, Gui::ViewProviderDocumentObject)
|
||||
|
||||
ViewProviderInspection::ViewProviderInspection() : search_radius(FLT_MAX)
|
||||
ViewProviderInspection::ViewProviderInspection()
|
||||
{
|
||||
ADD_PROPERTY_TYPE(OutsideGrayed,(false),"",(App::PropertyType) (App::Prop_Output|App::Prop_Hidden),"");
|
||||
ADD_PROPERTY_TYPE(PointSize,(1.0),"Display",(App::PropertyType) (App::Prop_None/*App::Prop_Hidden*/),"");
|
||||
|
||||
@@ -103,7 +103,7 @@ protected:
|
||||
SoCoordinate3 * pcCoords;
|
||||
|
||||
private:
|
||||
float search_radius;
|
||||
float search_radius{FLT_MAX};
|
||||
static bool addflag;
|
||||
static App::PropertyFloatConstraint::Constraints floatRange;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user