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_pointcloud_preprocessor): fix passedByValue #8242

Conversation

kobayu858
Copy link
Contributor

Description

This is a fix based on cppcheck passedByValue warnings

sensing/pointcloud_preprocessor/src/downsample_filter/robin_hood.h:1935:40: performance: inconclusive: Function parameter 'position' should be passed by const reference. [passedByValue]
  iterator emplace_hint(const_iterator position, Args &&... args)
                                       ^

sensing/pointcloud_preprocessor/src/downsample_filter/robin_hood.h:1954:39: performance: inconclusive: Function parameter 'hint' should be passed by const reference. [passedByValue]
  iterator try_emplace(const_iterator hint, const key_type & key, Args &&... args)
                                      ^

sensing/pointcloud_preprocessor/src/downsample_filter/robin_hood.h:1961:39: performance: inconclusive: Function parameter 'hint' should be passed by const reference. [passedByValue]
  iterator try_emplace(const_iterator hint, key_type && key, Args &&... args)
                                      ^

sensing/pointcloud_preprocessor/src/downsample_filter/robin_hood.h:1980:44: performance: inconclusive: Function parameter 'hint' should be passed by const reference. [passedByValue]
  iterator insert_or_assign(const_iterator hint, const key_type & key, Mapped && obj)
                                           ^

sensing/pointcloud_preprocessor/src/downsample_filter/robin_hood.h:1987:44: performance: inconclusive: Function parameter 'hint' should be passed by const reference. [passedByValue]
  iterator insert_or_assign(const_iterator hint, key_type && key, Mapped && obj)
                                           ^

sensing/pointcloud_preprocessor/src/downsample_filter/robin_hood.h:1999:34: performance: inconclusive: Function parameter 'hint' should be passed by const reference. [passedByValue]
  iterator insert(const_iterator hint, const value_type & keyval)
                                 ^

sensing/pointcloud_preprocessor/src/downsample_filter/robin_hood.h:2007:34: performance: inconclusive: Function parameter 'hint' should be passed by const reference. [passedByValue]
  iterator insert(const_iterator hint, value_type && keyval)
                                 ^

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:sensing Data acquisition from sensors, drivers, preprocessing. (auto-assigned) label Jul 29, 2024
@kobayu858 kobayu858 requested a review from veqcc July 29, 2024 08:00
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 added the tag:run-build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Jul 29, 2024
Copy link

codecov bot commented Jul 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 29.24%. Comparing base (6719f5f) to head (7155872).
Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8242      +/-   ##
==========================================
- Coverage   29.25%   29.24%   -0.01%     
==========================================
  Files        1600     1602       +2     
  Lines      117744   117784      +40     
  Branches    50716    50720       +4     
==========================================
+ Hits        34447    34448       +1     
- Misses      74072    74112      +40     
+ Partials     9225     9224       -1     
Flag Coverage Δ *Carryforward flag
differential 12.71% <ø> (?)
total 29.25% <ø> (ø) Carriedforward from 6719f5f

*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

@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 19a1550 into autowarefoundation:main Aug 4, 2024
39 checks passed
kyoichi-sugahara pushed a commit to kyoichi-sugahara/autoware.universe that referenced this pull request Aug 5, 2024
…ndation#8242)

fix:passedByValue

Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>
@kobayu858 kobayu858 deleted the fix/cppcheck_passedByValue_sen-1 branch August 13, 2024 06:18
esteve pushed a commit to esteve/autoware.universe that referenced this pull request Aug 13, 2024
…ndation#8242)

fix:passedByValue

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:sensing Data acquisition from sensors, drivers, preprocessing. (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.

3 participants