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(behavior_velocity_planner): fix cppcheck warnings of virtualCallInConstructor #8376

Conversation

taisa1
Copy link
Contributor

@taisa1 taisa1 commented Aug 6, 2024

Description

This is a fix based on cppcheck warning virtualCallInConstructor.

planning/behavior_velocity_planner/autoware_behavior_velocity_blind_spot_module/src/manager.hpp:38:16: style: Virtual function 'getModuleName' is called from constructor 'BlindSpotModuleManager(rclcpp::Node&node)' at line 35. Dynamic binding is not used. [virtualCallInConstructor]
planning/behavior_velocity_planner/autoware_behavior_velocity_crosswalk_module/src/manager.hpp:45:16: style: Virtual function 'getModuleName' is called from constructor 'CrosswalkModuleManager(rclcpp::Node&node)' at line 37. Dynamic binding is not used. [virtualCallInConstructor]
planning/behavior_velocity_planner/autoware_behavior_velocity_detection_area_module/src/manager.hpp:37:16: style: Virtual function 'getModuleName' is called from constructor 'DetectionAreaModuleManager(rclcpp::Node&node)' at line 40. Dynamic binding is not used. [virtualCallInConstructor]
planning/behavior_velocity_planner/autoware_behavior_velocity_no_drivable_lane_module/src/manager.hpp:37:16: style: Virtual function 'getModuleName' is called from constructor 'NoDrivableLaneModuleManager(rclcpp::Node&node)' at line 29. Dynamic binding is not used. [virtualCallInConstructor]
planning/behavior_velocity_planner/autoware_behavior_velocity_no_stopping_area_module/src/manager.hpp:37:16: style: Virtual function 'getModuleName' is called from constructor 'NoStoppingAreaModuleManager(rclcpp::Node&node)' at line 40. Dynamic binding is not used. [virtualCallInConstructor]
planning/behavior_velocity_planner/autoware_behavior_velocity_occlusion_spot_module/src/manager.hpp:47:16: style: Virtual function 'getModuleName' is called from constructor 'OcclusionSpotModuleManager(rclcpp::Node&node)' at line 37. Dynamic binding is not used. [virtualCallInConstructor]
planning/behavior_velocity_planner/autoware_behavior_velocity_run_out_module/src/manager.hpp:33:16: style: Virtual function 'getModuleName' is called from constructor 'RunOutModuleManager(rclcpp::Node&node)' at line 41. Dynamic binding is not used. [virtualCallInConstructor]
planning/behavior_velocity_planner/autoware_behavior_velocity_speed_bump_module/src/manager.hpp:37:16: style: Virtual function 'getModuleName' is called from constructor 'SpeedBumpModuleManager(rclcpp::Node&node)' at line 39. Dynamic binding is not used. [virtualCallInConstructor]
planning/behavior_velocity_planner/autoware_behavior_velocity_stop_line_module/src/manager.hpp:42:16: style: Virtual function 'getModuleName' is called from constructor 'StopLineModuleManager(rclcpp::Node&node)' at line 32. Dynamic binding is not used. [virtualCallInConstructor]
planning/behavior_velocity_planner/autoware_behavior_velocity_template_module/src/manager.hpp:54:16: style: Virtual function 'getModuleName' is called from constructor 'TemplateModuleManager(rclcpp::Node&node)' at line 36. Dynamic binding is not used. [virtualCallInConstructor]
planning/behavior_velocity_planner/autoware_behavior_velocity_traffic_light_module/src/manager.hpp:38:16: style: Virtual function 'getModuleName' is called from constructor 'TrafficLightModuleManager(rclcpp::Node&node)' at line 36. Dynamic binding is not used. [virtualCallInConstructor]
planning/behavior_velocity_planner/autoware_behavior_velocity_virtual_traffic_light_module/src/manager.hpp:37:16: style: Virtual function 'getModuleName' is called from constructor 'VirtualTrafficLightModuleManager(rclcpp::Node&node)' at line 42. Dynamic binding is not used. [virtualCallInConstructor]
planning/behavior_velocity_planner/autoware_behavior_velocity_walkway_module/src/manager.hpp:43:16: style: Virtual function 'getModuleName' is called from constructor 'WalkwayModuleManager(rclcpp::Node&node)' at line 35. Dynamic binding is not used. [virtualCallInConstructor]

Related links

Private Links:

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:planning Route planning, decision-making, and navigation. (auto-assigned) label Aug 6, 2024
Copy link

github-actions bot commented Aug 6, 2024

Thank you for contributing to the Autoware project!

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

Please ensure:

Copy link
Contributor

@shmpwk shmpwk left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

codecov bot commented Aug 12, 2024

Codecov Report

Attention: Patch coverage is 92.85714% with 1 line in your changes missing coverage. Please review.

Project coverage is 29.21%. Comparing base (2c19f1e) to head (8095020).
Report is 55 commits behind head on main.

Files Patch % Lines
..._behavior_velocity_template_module/src/manager.cpp 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8376      +/-   ##
==========================================
+ Coverage   23.90%   29.21%   +5.31%     
==========================================
  Files        1380     1615     +235     
  Lines      101750   119459   +17709     
  Branches    38714    51412   +12698     
==========================================
+ Hits        24324    34902   +10578     
- Misses      74920    75251     +331     
- Partials     2506     9306    +6800     
Flag Coverage Δ *Carryforward flag
differential 18.19% <92.85%> (?)
total 29.29% <ø> (+5.39%) ⬆️ Carriedforward from 9b7ae6b

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

@TakaHoribe TakaHoribe merged commit 9a461b4 into autowarefoundation:main Aug 20, 2024
29 of 30 checks passed
@taisa1 taisa1 deleted the fix_virtual_call_in_constructor_behavior_velocity_planner branch August 27, 2024 05:24
kyoichi-sugahara pushed a commit to kyoichi-sugahara/autoware.universe that referenced this pull request Aug 27, 2024
…nConstructor (autowarefoundation#8376)

Co-authored-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) 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.

6 participants