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 #218

Merged
merged 2 commits into from
Nov 8, 2024

Conversation

kobayu858
Copy link
Contributor

@kobayu858 kobayu858 commented Nov 8, 2024

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.

Copy link

codecov bot commented Nov 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 0.00%. Comparing base (c7456f9) to head (f2a07d3).
Report is 1 commits behind head on main.

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

HEAD has 3 uploads less than BASE
Flag BASE (c7456f9) HEAD (f2a07d3)
total 3 0
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #218       +/-   ##
==========================================
- Coverage   26.16%   0.00%   -26.17%     
==========================================
  Files          99      86       -13     
  Lines        9199    7638     -1561     
  Branches     2215     940     -1275     
==========================================
- Hits         2407       0     -2407     
- Misses       6402    7638     +1236     
+ Partials      390       0      -390     
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.

@veqcc veqcc requested a review from mojomex November 8, 2024 07:25
@veqcc
Copy link

veqcc commented Nov 8, 2024

@mojomex
Hi, this is a minor fix baed on clang-tidy.
Please assign another reviewer if there is someone suitable for it, thanks 👍

Copy link
Collaborator

@mojomex mojomex left a comment

Choose a reason for hiding this comment

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

LGTM!

@mojomex mojomex merged commit 8e75661 into tier4:main Nov 8, 2024
12 of 13 checks passed
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.

3 participants