Skip to content

Commit

Permalink
remove null opt derefs (#330)
Browse files Browse the repository at this point in the history
  • Loading branch information
lia-viam authored Nov 25, 2024
1 parent b4fa29e commit 4de4617
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/viam/sdk/services/private/motion_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,23 +107,23 @@ motion_configuration from_proto(const service::motion::v1::MotionConfiguration&
}

if (proto.has_position_polling_frequency_hz()) {
*mc.position_polling_frequency_hz = proto.position_polling_frequency_hz();
mc.position_polling_frequency_hz = proto.position_polling_frequency_hz();
}

if (proto.has_obstacle_polling_frequency_hz()) {
*mc.obstacle_polling_frequency_hz = proto.obstacle_polling_frequency_hz();
mc.obstacle_polling_frequency_hz = proto.obstacle_polling_frequency_hz();
}

if (proto.has_plan_deviation_m()) {
*mc.plan_deviation_m = proto.plan_deviation_m();
mc.plan_deviation_m = proto.plan_deviation_m();
}

if (proto.has_linear_m_per_sec()) {
*mc.linear_m_per_sec = proto.linear_m_per_sec();
mc.linear_m_per_sec = proto.linear_m_per_sec();
}

if (proto.has_angular_degs_per_sec()) {
*mc.angular_degs_per_sec = proto.angular_degs_per_sec();
mc.angular_degs_per_sec = proto.angular_degs_per_sec();
}

return mc;
Expand Down

0 comments on commit 4de4617

Please sign in to comment.