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 cppcheck warnings of functionStatic #8163

Conversation

taisa1
Copy link
Contributor

@taisa1 taisa1 commented Jul 23, 2024

Description

This is a fix based on cppcheck warning functionStatic.

sensing/autoware_pointcloud_preprocessor/src/downsample_filter/robin_hood.h:570:8: performance: inconclusive: Technically the member function 'robin_hood::detail::NodeAllocator::addOrFree' can be static (but you may consider moving to unnamed namespace). [functionStatic]
sensing/autoware_pointcloud_preprocessor/src/downsample_filter/robin_hood.h:1054:10: performance: inconclusive: Technically the member function 'robin_hood::detail::Table::DataNode::destroy' can be static (but you may consider moving to unnamed namespace). [functionStatic]
sensing/autoware_pointcloud_preprocessor/src/downsample_filter/robin_hood.h:1055:10: performance: inconclusive: Technically the member function 'robin_hood::detail::Table::DataNode::destroyDoNotDeallocate' can be static (but you may consider moving to unnamed namespace). [functionStatic]
sensing/autoware_pointcloud_preprocessor/src/downsample_filter/robin_hood.h:1265:10: performance: inconclusive: Technically the member function 'robin_hood::detail::Table::Destroyer::nodes' can be static (but you may consider moving to unnamed namespace). [functionStatic]
sensing/autoware_pointcloud_preprocessor/src/downsample_filter/robin_hood.h:1267:10: performance: inconclusive: Technically the member function 'robin_hood::detail::Table::Destroyer::nodesDoNotDeallocate' can be static (but you may consider moving to unnamed namespace). [functionStatic]
sensing/autoware_pointcloud_preprocessor/src/downsample_filter/robin_hood.h:1273:10: performance: inconclusive: Technically the member function 'robin_hood::detail::Table::Destroyer::nodes' can be static (but you may consider moving to unnamed namespace). [functionStatic]
sensing/autoware_pointcloud_preprocessor/src/downsample_filter/robin_hood.h:1288:10: performance: inconclusive: Technically the member function 'robin_hood::detail::Table::Destroyer::nodesDoNotDeallocate' can be static (but you may consider moving to unnamed namespace). [functionStatic]

Static member functions cannot be const, so some const are removed.

Related links

C++ reference (static)

How was this PR tested?

Only checked if build succeeded.

Notes for reviewers

None.

Interface changes

None.

Effects on system behavior

None.

Signed-off-by: taisa1 <kento.osa@tier4.jp>
@github-actions github-actions bot added the component:sensing Data acquisition from sensors, drivers, preprocessing. (auto-assigned) label Jul 23, 2024
Copy link

github-actions bot commented Jul 23, 2024

Thank you for contributing to the Autoware project!

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

Please ensure:

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

codecov bot commented Jul 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 29.29%. Comparing base (ca32505) to head (877461e).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8163      +/-   ##
==========================================
- Coverage   29.31%   29.29%   -0.02%     
==========================================
  Files        1609     1646      +37     
  Lines      119413   120871    +1458     
  Branches    51480    52271     +791     
==========================================
+ Hits        35002    35413     +411     
- Misses      75111    76051     +940     
- Partials     9300     9407     +107     
Flag Coverage Δ *Carryforward flag
differential 15.00% <ø> (?)
total 29.14% <ø> (-0.17%) ⬇️ Carriedforward from a1c77e7

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

@atsushi421 atsushi421 self-requested a review July 30, 2024 07:49
Copy link
Contributor

@atsushi421 atsushi421 left a comment

Choose a reason for hiding this comment

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

LGTM

@atsushi421 atsushi421 merged commit d7bde29 into autowarefoundation:main Aug 6, 2024
30 checks passed
@atsushi421 atsushi421 deleted the fix_function_static_autoware_pointcloud_preprocessor branch August 6, 2024 10:41
esteve pushed a commit to esteve/autoware.universe that referenced this pull request Aug 13, 2024
…ionStatic (autowarefoundation#8163)

fix: deal with functionStatic warnings

Signed-off-by: taisa1 <kento.osa@tier4.jp>
Co-authored-by: Yi-Hsiang Fang (Vivid) <146902905+vividf@users.noreply.github.com>
xtk8532704 pushed a commit to tier4/autoware.universe that referenced this pull request Aug 15, 2024
…ionStatic (autowarefoundation#8163)

fix: deal with functionStatic warnings

Signed-off-by: taisa1 <kento.osa@tier4.jp>
Co-authored-by: Yi-Hsiang Fang (Vivid) <146902905+vividf@users.noreply.github.com>
Signed-off-by: xtk8532704 <1041084556@qq.com>
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.

4 participants