Robot: modernize C++: use default member init

This commit is contained in:
wmayer
2023-08-22 17:24:15 +02:00
committed by wwmayer
parent 2ad2a0258d
commit 18cffaf206
8 changed files with 9 additions and 15 deletions

View File

@@ -37,7 +37,6 @@ PROPERTY_SOURCE(Robot::RobotObject, App::GeoFeature)
RobotObject::RobotObject()
:block(false)
{
ADD_PROPERTY_TYPE(RobotVrmlFile ,(nullptr),"Robot definition" ,Prop_None,"Included file with the VRML representation of the robot");
ADD_PROPERTY_TYPE(RobotKinematicFile,(nullptr),"Robot definition",Prop_None,"Included file with kinematic definition of the robot Axis");

View File

@@ -76,7 +76,7 @@ protected:
Robot6Axis robot;
bool block;
bool block{false};
};

View File

@@ -34,7 +34,7 @@ using namespace KDL;
//===========================================================================
Simulation::Simulation(const Robot::Trajectory &Trac,Robot::Robot6Axis &Rob)
:Pos(0.0),Trac(Trac),Rob(Rob)
:Trac(Trac),Rob(Rob)
{
// simulate a trajectory with only one waypoint make no sense!
assert(Trac.getSize() > 1);

View File

@@ -54,9 +54,9 @@ public:
// apply the start axis angles and set to time 0. Restores the exact start position
void reset();
double Pos;
double Axis[6];
double startAxis[6];
double Pos{0.0};
double Axis[6]{};
double startAxis[6]{};
Trajectory Trac;
Robot6Axis &Rob;

View File

@@ -58,11 +58,7 @@ using namespace Base;
TYPESYSTEM_SOURCE(Robot::Trajectory , Base::Persistence)
Trajectory::Trajectory()
:pcTrajectory(nullptr)
{
}
Trajectory::Trajectory() = default;
Trajectory::Trajectory(const Trajectory& Trac)
:vpcWaypoints(Trac.vpcWaypoints.size()),pcTrajectory(nullptr)

View File

@@ -77,7 +77,7 @@ protected:
std::vector<Waypoint*> vpcWaypoints;
KDL::Trajectory_Composite *pcTrajectory;
KDL::Trajectory_Composite *pcTrajectory{nullptr};
};
} //namespace Part

View File

@@ -49,7 +49,6 @@ using namespace RobotGui;
PROPERTY_SOURCE(RobotGui::ViewProviderRobotObject, Gui::ViewProviderGeometryObject)
ViewProviderRobotObject::ViewProviderRobotObject()
: pcDragger(nullptr),toolShape(nullptr)
{
ADD_PROPERTY(Manipulator,(0));

View File

@@ -75,10 +75,10 @@ protected:
//SoTransform * pcTcpTransform;
//SoTrackballDragger * pcDragger;
SoJackDragger * pcDragger;
SoJackDragger * pcDragger{nullptr};
// view provider of the toolshape if set
Gui::ViewProvider *toolShape;
Gui::ViewProvider *toolShape{nullptr};
// Pointers to the robot axis nodes in the VRML model
SoVRMLTransform *Axis1Node;