[Robot etc.] remove superfluous nullptr checks

This commit is contained in:
Uwe
2022-07-18 02:54:09 +02:00
parent c619e7bbda
commit 7b4e014263
5 changed files with 9 additions and 9 deletions

View File

@@ -113,7 +113,7 @@ int WaypointPy::PyInit(PyObject* args, PyObject* kwd)
else
getWaypointPtr()->Type = Waypoint::UNDEF;
if (vel == nullptr)
if (!vel)
switch (getWaypointPtr()->Type) {
case Waypoint::PTP:
getWaypointPtr()->Velocity = 100;
@@ -132,7 +132,7 @@ int WaypointPy::PyInit(PyObject* args, PyObject* kwd)
getWaypointPtr()->Cont = cont ? true : false;
getWaypointPtr()->Tool = tool;
getWaypointPtr()->Base = base;
if (acc == nullptr)
if (!acc)
getWaypointPtr()->Acceleration = 100;
else
getWaypointPtr()->Acceleration = Base::UnitsApi::toDouble(acc, Base::Unit::Acceleration);