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

fix(autoware_velocity_smoother): fix shadowVariablefix:shadowVariable #7950

Merged

Conversation

kobayu858
Copy link
Contributor

Description

This is a fix based on cppcheck shadowVariable warnings

planning/autoware_velocity_smoother/src/smoother/analytical_jerk_constrained_smoother/analytical_jerk_constrained_smoother.cpp:376:20: style: Local variable 'start_index' shadows outer variable [shadowVariable]
      const size_t start_index = std::get<0>(lat_acc_filtered_range);
                   ^

planning/autoware_velocity_smoother/src/smoother/analytical_jerk_constrained_smoother/analytical_jerk_constrained_smoother.cpp:377:20: style: Local variable 'end_index' shadows outer variable [shadowVariable]
      const size_t end_index = std::get<1>(lat_acc_filtered_range);
                   ^

planning/autoware_velocity_smoother/src/smoother/analytical_jerk_constrained_smoother/analytical_jerk_constrained_smoother.cpp:378:20: style: Local variable 'min_latacc_velocity' shadows outer variable [shadowVariable]
      const double min_latacc_velocity = std::get<2>(lat_acc_filtered_range);
                   ^

planning/autoware_velocity_smoother/src/smoother/analytical_jerk_constrained_smoother/analytical_jerk_constrained_smoother.cpp:417:23: style: Local variable 'i' shadows outer variable [shadowVariable]
    for (unsigned int i = 0; i < tmp_indices.size() - 1; ++i) {
                      ^

Related links

Parent Issue:

  • Link

How was this PR tested?

Notes for reviewers

None.

Interface changes

None.

Effects on system behavior

None.

Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>
@github-actions github-actions bot added the component:planning Route planning, decision-making, and navigation. (auto-assigned) label Jul 10, 2024
Copy link

Thank you for contributing to the Autoware project!

🚧 If your pull request is in progress, switch it to draft mode.

Please ensure:

@kobayu858 kobayu858 requested a review from veqcc July 10, 2024 11:25
@kobayu858 kobayu858 added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Jul 10, 2024
Copy link

codecov bot commented Jul 10, 2024

Codecov Report

Attention: Patch coverage is 44.44444% with 5 lines in your changes missing coverage. Please review.

Project coverage is 28.75%. Comparing base (a39cfb7) to head (e2d9840).
Report is 17 commits behind head on main.

Files Patch % Lines
..._smoother/analytical_jerk_constrained_smoother.cpp 44.44% 4 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7950      +/-   ##
==========================================
- Coverage   28.75%   28.75%   -0.01%     
==========================================
  Files        1594     1598       +4     
  Lines      116892   116889       -3     
  Branches    50050    50047       -3     
==========================================
- Hits        33616    33615       -1     
+ Misses      74178    74176       -2     
  Partials     9098     9098              
Flag Coverage Δ *Carryforward flag
differential 18.49% <44.44%> (?)
total 28.76% <ø> (+0.01%) ⬆️ Carriedforward from a39cfb7

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kobayu858
Copy link
Contributor Author

@rej55 @mkuri @satoshi-ota @TakaHoribe

Please confirm the PR. Thank you very much.

@kobayu858 kobayu858 merged commit 16e19c7 into autowarefoundation:main Jul 18, 2024
39 checks passed
yhisaki pushed a commit to yhisaki/autoware.universe that referenced this pull request Jul 19, 2024
…autowarefoundation#7950)

fix:shadowVariable

Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>
Signed-off-by: Y.Hisaki <yhisaki31@gmail.com>
Ariiees pushed a commit to Ariiees/autoware.universe that referenced this pull request Jul 22, 2024
…autowarefoundation#7950)

fix:shadowVariable

Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>
chihungtzeng pushed a commit to chihungtzeng/autoware.universe that referenced this pull request Jul 23, 2024
…autowarefoundation#7950)

fix:shadowVariable

Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>
Signed-off-by: chtseng <chtseng@itri.org.tw>
@kobayu858 kobayu858 deleted the fix/cppcheck_shadowVariable_pla-4 branch July 23, 2024 01:13
esteve pushed a commit to esteve/autoware.universe that referenced this pull request Aug 13, 2024
…autowarefoundation#7950)

fix:shadowVariable

Signed-off-by: kobayu858 <yutaro.kobayashi@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.

3 participants