Skip to content

Commit

Permalink
Add breaks to switch cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Chi-EEE committed Apr 17, 2024
1 parent 5d8fef0 commit 4e60a29
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,17 @@ namespace behaviour_tree::node::custom::action
case utils::hash("Forward"):
{
result = DirectionType::Forward;
break;
}
case utils::hash("Backward"):
{
result = DirectionType::Backward;
break;
}
default:
{
result = tl::make_unexpected(fmt::format(R"(Invalid direction_type: '{}' | Action:Drive:['{}',{}])", direction_type_attribute, name_attribute, index));
break;
}
};
return result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ namespace behaviour_tree::node::custom::action
default:
{
result = tl::unexpected(fmt::format(R"(Invalid wheel_type: '{}' | Action:SetSpeed:['{}',{}])", wheel_type_attribute, name_attribute, index));
}
break;
}
};
return result;
}();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ namespace behaviour_tree::node::custom::action
default:
{
result = tl::unexpected(fmt::format(R"(Invalid wheel_type: '{}' | Action:SetWheelDirection:['{}',{}])", wheel_type_attribute, name_attribute, index));
}
break;
}
};
return result;
}();
Expand Down

0 comments on commit 4e60a29

Please sign in to comment.