Skip to content
Snippets Groups Projects
Unverified Commit a30816f2 authored by Martijn Buijs's avatar Martijn Buijs Committed by GitHub
Browse files

Simplify by removing return statements (#2005)


Signed-off-by: default avatarMartijn Buijs <martijn.buijs@gmail.com>
parent 506384f2
No related branches found
No related tags found
No related merge requests found
......@@ -156,16 +156,13 @@ DWBPublisher::on_cleanup()
void
DWBPublisher::publishEvaluation(std::shared_ptr<dwb_msgs::msg::LocalPlanEvaluation> results)
{
if (eval_pub_->get_subscription_count() < 1) {return;}
if (results == nullptr) {return;}
if (publish_evaluation_) {
auto msg = std::make_unique<dwb_msgs::msg::LocalPlanEvaluation>(*results);
eval_pub_->publish(std::move(msg));
if (results) {
if (publish_evaluation_ && eval_pub_->get_subscription_count() > 0) {
auto msg = std::make_unique<dwb_msgs::msg::LocalPlanEvaluation>(*results);
eval_pub_->publish(std::move(msg));
}
publishTrajectories(*results);
}
publishTrajectories(*results);
}
void
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment