Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(mission_planner): remove redundant is_reroute check #6980

Merged
merged 1 commit into from
May 11, 2024

Conversation

veqcc
Copy link
Contributor

@veqcc veqcc commented May 11, 2024

Description

This is a fix based on CppCheck warning

planning/mission_planner/src/mission_planner/mission_planner.cpp:253:18: style: Condition 'is_reroute' is always true [knownConditionTrueFalse]
    change_state(is_reroute ? RouteState::SET : RouteState::UNSET);
                 ^
planning/mission_planner/src/mission_planner/mission_planner.cpp:251:7: note: Assuming that condition 'is_reroute' is not redundant
  if (is_reroute && !check_reroute_safety(*current_route_, route)) {
      ^
planning/mission_planner/src/mission_planner/mission_planner.cpp:253:18: note: Condition 'is_reroute' is always true
    change_state(is_reroute ? RouteState::SET : RouteState::UNSET);
                 ^
planning/mission_planner/src/mission_planner/mission_planner.cpp:301:18: style: Condition 'is_reroute' is always true [knownConditionTrueFalse]
    change_state(is_reroute ? RouteState::SET : RouteState::UNSET);
                 ^
planning/mission_planner/src/mission_planner/mission_planner.cpp:299:7: note: Assuming that condition 'is_reroute' is not redundant
  if (is_reroute && !check_reroute_safety(*current_route_, route)) {
      ^
planning/mission_planner/src/mission_planner/mission_planner.cpp:301:18: note: Condition 'is_reroute' is always true
    change_state(is_reroute ? RouteState::SET : RouteState::UNSET);
                 ^

Tests performed

No

Effects on system behavior

Interface changes

Pre-review checklist for the PR author

The PR author must check the checkboxes below when creating the PR.

In-review checklist for the PR reviewers

The PR reviewers must check the checkboxes below before approval.

Post-review checklist for the PR author

The PR author must check the checkboxes below before merging.

  • There are no open discussions or they are tracked via tickets.

After all checkboxes are checked, anyone who has write access can merge the PR.

Sorry, something went wrong.

Signed-off-by: Ryuta Kambe <ryuta.kambe@tier4.jp>
@veqcc veqcc added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label May 11, 2024
@github-actions github-actions bot added component:planning Route planning, decision-making, and navigation. (auto-assigned) and removed run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) labels May 11, 2024
@soblin soblin changed the title fix(mission_planner): remove redundant is_reroute check refactor(mission_planner): remove redundant is_reroute check May 11, 2024
@veqcc veqcc added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label May 11, 2024
@veqcc veqcc merged commit 8176c63 into autowarefoundation:main May 11, 2024
44 of 47 checks passed
@veqcc veqcc deleted the fix/remove_redundant_checks branch May 11, 2024 13:57
vividf pushed a commit to vividf/autoware.universe that referenced this pull request May 16, 2024
…arefoundation#6980)

remove redundant is_reroute check

Signed-off-by: Ryuta Kambe <ryuta.kambe@tier4.jp>
Signed-off-by: vividf <yihsiang.fang@tier4.jp>
karishma1911 pushed a commit to Interplai/autoware.universe that referenced this pull request Jun 3, 2024
…arefoundation#6980)

remove redundant is_reroute check

Signed-off-by: Ryuta Kambe <ryuta.kambe@tier4.jp>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:planning Route planning, decision-making, and navigation. (auto-assigned) run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants