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_perception_rviz_plugin): fix passedByValue #8192

Merged

Conversation

bathteayo
Copy link
Member

Description

This is a fix based on cppcheck passedByValue warnings

common/autoware_perception_rviz_plugin/src/object_detection/object_polygon_detail.cpp:462:21: performance: Function parameter 'label' should be passed by const reference. [passedByValue]
  const std::string label, const std_msgs::msg::ColorRGBA & color_rgba)
                    ^

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: bathteayo <105347690+bathteayo@users.noreply.github.com>
@bathteayo bathteayo requested a review from veqcc July 25, 2024 08:57
@github-actions github-actions bot added the component:common Common packages from the autoware-common repository. (auto-assigned) label Jul 25, 2024
Copy link

github-actions bot commented Jul 25, 2024

Thank you for contributing to the Autoware project!

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

Please ensure:

@kobayu858 kobayu858 added the tag:run-build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Jul 25, 2024
Copy link

codecov bot commented Jul 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 29.13%. Comparing base (093c20c) to head (c36cf81).
Report is 64 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8192   +/-   ##
=======================================
  Coverage   29.13%   29.13%           
=======================================
  Files        1609     1609           
  Lines      118141   118141           
  Branches    50847    50847           
=======================================
  Hits        34425    34425           
  Misses      74508    74508           
  Partials     9208     9208           
Flag Coverage Δ *Carryforward flag
differential 0.00% <ø> (?)
total 29.13% <ø> (ø) Carriedforward from b373930

*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.

Copy link
Contributor

@veqcc veqcc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.hpp file should also be modified?

Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>
@kobayu858
Copy link
Contributor

@veqcc
Indeed, the declaration and definition must match the type.
That is why I fixed it.

However, it is strange because the CI build was passed.

Copy link
Contributor

@YoshiRi YoshiRi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kobayu858 kobayu858 merged commit b00e8e9 into autowarefoundation:main Aug 2, 2024
30 checks passed
@bathteayo bathteayo deleted the fix/cppcheck_passedByValue_com-1 branch August 2, 2024 05:54
kyoichi-sugahara pushed a commit to kyoichi-sugahara/autoware.universe that referenced this pull request Aug 5, 2024
…dation#8192)

* fix: passedByValue

Signed-off-by: bathteayo <105347690+bathteayo@users.noreply.github.com>

* fix:passedByValue

Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>

---------

Signed-off-by: bathteayo <105347690+bathteayo@users.noreply.github.com>
Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>
Co-authored-by: kobayu858 <yutaro.kobayashi@tier4.jp>
esteve pushed a commit to esteve/autoware.universe that referenced this pull request Aug 13, 2024
…dation#8192)

* fix: passedByValue

Signed-off-by: bathteayo <105347690+bathteayo@users.noreply.github.com>

* fix:passedByValue

Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>

---------

Signed-off-by: bathteayo <105347690+bathteayo@users.noreply.github.com>
Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>
Co-authored-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:common Common packages from the autoware-common repository. (auto-assigned) tag: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.

4 participants