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(control_performance_analysis): clang-diagnostic-pessimizing-move #9380

Merged

Conversation

veqcc
Copy link
Contributor

@veqcc veqcc commented Nov 19, 2024

Description

Removed unnecessary move.

This solves the following clang-tidy error

autoware/src/universe/autoware.universe/control/control_performance_analysis/src/control_performance_analysis_core.cpp:339:9: error: moving a temporary object prevents copy elision [clang-diagnostic-pessimizing-move]
        std::move(std::make_unique<msg::DrivingMonitorStamped>(driving_status_vars));
        ^
/home/veqcc/work/autoware/src/universe/autoware.universe/control/control_performance_analysis/src/control_performance_analysis_core.cpp:339:9: note: remove std::move call here
        std::move(std::make_unique<msg::DrivingMonitorStamped>(driving_status_vars));
        ^~~~~~~~~~  

Related links

Parent Issue:

  • Link

How was this PR tested?

Notes for reviewers

None.

Interface changes

None.

Effects on system behavior

None.

@veqcc veqcc self-assigned this Nov 19, 2024
@github-actions github-actions bot added the component:control Vehicle control algorithms and mechanisms. (auto-assigned) label Nov 19, 2024
Copy link

Thank you for contributing to the Autoware project!

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

Please ensure:

@veqcc veqcc added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Nov 19, 2024
Copy link

codecov bot commented Nov 19, 2024

Codecov Report

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

Project coverage is 29.78%. Comparing base (a0c4ab4) to head (5a0fcc0).
Report is 28 commits behind head on main.

Files with missing lines Patch % Lines
...analysis/src/control_performance_analysis_core.cpp 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9380      +/-   ##
==========================================
- Coverage   29.79%   29.78%   -0.01%     
==========================================
  Files        1338     1339       +1     
  Lines      103211   103236      +25     
  Branches    40212    40215       +3     
==========================================
  Hits        30748    30748              
- Misses      69477    69502      +25     
  Partials     2986     2986              
Flag Coverage Δ *Carryforward flag
differential 0.00% <0.00%> (?)
total 29.79% <ø> (+<0.01%) ⬆️ Carriedforward from a0c4ab4

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


🚨 Try these New Features:

@veqcc veqcc merged commit 5778e01 into autowarefoundation:main Nov 19, 2024
42 checks passed
@veqcc veqcc deleted the fix/clang-diagnostic-pessimizing-move branch November 19, 2024 08:33
zulfaqar-azmi-t4 pushed a commit to tier4/autoware.universe that referenced this pull request Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:control Vehicle control algorithms and mechanisms. (auto-assigned) 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.

2 participants