-
Notifications
You must be signed in to change notification settings - Fork 168
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
chore: clang-tidy performance-move-const-arg #1359
chore: clang-tidy performance-move-const-arg #1359
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1359 +/- ##
==========================================
- Coverage 47.49% 47.49% -0.01%
==========================================
Files 375 375
Lines 19826 19824 -2
Branches 9282 9282
==========================================
- Hits 9417 9415 -2
Misses 4035 4035
Partials 6374 6374
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me in general.
Maybe you could add in the description, that you also changed all relevant move()
-cases in this PR.
As far as I can remember, the CylinderSurface.*
are very similar to the ConeSurface.*
, and the cbounds
are there static too. But it seems you haven't touched them in this PR.
In |
This enables the
performance-move-const-arg
check in clang-tidy.It suggests replacing/removing
std::move
where it won't actually do anything, e.g. because the called function takes a const reference anyway, or the underlying type is trivially copyable. This PR removes thestd::move
calls in these cases.