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(nebula_examples): fix bugprone-incorrect-roundings #215

Closed
wants to merge 1 commit into from

Conversation

kobayu858
Copy link
Contributor

PR Type

  • Improvement

Related Links

Description

This is a fix based on clang-tidy bugprone-incorrect-roundings error.

/home/emb4/autoware/autoware/src/sensor_component/external/nebula/nebula_examples/src/velodyne/velodyne_ros_offline_extract_bag_pcd.cpp:180:44: error: casting (double + 0.5) to integer leads to incorrect rounding; consider using lround (#include <cmath>) instead [bugprone-incorrect-roundings,-warnings-as-errors]
    sensor_configuration.cloud_min_angle = 100 * (2 * M_PI - min_angle) * 180 / M_PI + 0.5;
                                           ^
/home/emb4/autoware/autoware/src/sensor_component/external/nebula/nebula_examples/src/velodyne/velodyne_ros_offline_extract_bag_pcd.cpp:181:44: error: casting (double + 0.5) to integer leads to incorrect rounding; consider using lround (#include <cmath>) instead [bugprone-incorrect-roundings,-warnings-as-errors]
    sensor_configuration.cloud_max_angle = 100 * (2 * M_PI - max_angle) * 180 / M_PI + 0.5;
                                           ^

Review Procedure

Remarks

Pre-Review Checklist for the PR Author

PR Author should check the checkboxes below when creating the PR.

  • Assign PR to reviewer

Checklist for the PR Reviewer

Reviewers should check the checkboxes below before approval.

  • Commits are properly organized and messages are according to the guideline
  • (Optional) Unit tests have been written for new behavior
  • PR title describes the changes

Post-Review Checklist for the PR Author

PR Author should check the checkboxes below before merging.

  • All open points are addressed and tracked via issues or tickets

CI Checks

  • Build and test for PR: Required to pass before the merge.

@kobayu858 kobayu858 changed the title fix(nebula_examples): fix bugprone-incorrect-roundings fix(nebula_examples): fix bugprone-incorrect-roundings Nov 1, 2024
@kobayu858 kobayu858 marked this pull request as draft November 1, 2024 08:08
@kobayu858
Copy link
Contributor Author

Closed because I forgot that it was outside the scope of work.

@kobayu858 kobayu858 closed this Nov 1, 2024
Copy link

codecov bot commented Nov 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 0.00%. Comparing base (214373a) to head (d1afc68).

❗ There is a different number of reports uploaded between BASE (214373a) and HEAD (d1afc68). Click for more details.

HEAD has 8 uploads less than BASE
Flag BASE (214373a) HEAD (d1afc68)
total 8 0
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #215       +/-   ##
==========================================
- Coverage   25.88%   0.00%   -25.89%     
==========================================
  Files          99      86       -13     
  Lines        9190    7628     -1562     
  Branches     2211     937     -1274     
==========================================
- Hits         2379       0     -2379     
- Misses       6426    7628     +1202     
+ Partials      385       0      -385     
Flag Coverage Δ
differential 0.00% <ø> (?)
total ?

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@kobayu858 kobayu858 deleted the clang-tidy-10 branch November 8, 2024 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant