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 #627 #639

Merged
merged 1 commit into from
Dec 2, 2021
Merged

fix #627 #639

merged 1 commit into from
Dec 2, 2021

Conversation

Cyan4973
Copy link
Owner

@Cyan4973 Cyan4973 commented Dec 1, 2021

attempt to fix a minor PVS Studio warning
which claims that passing a value by copy is worse for performance than a value by reference.
Given that the value is 16 bytes long, the claim is quite debatable, if not already silly from the start,
but it is even more so in this case because the function is very short and designed to be inlined by the compiler anyway.

Made the inlining objective more explicit, in an attempt to silence the static analyzer objection.

This is a blind fix, as I don't have PVS Studio to check.

fix #627 (hopefully)

attempt to fix a minor PVS Studio warning
which claims that passing a value by copy is worse for performance than a value by reference,
which, given that the value is 16 bytes long, is already silly just from the start,
but is even more so in this case as the function is short designed to be inlined by the compiler anyway.

Made the inlining objective more explicit, in an attempt to silence the static analyzer objection.

This is a blind fix, as I don't have PVS Studio to check.
@kcgen
Copy link
Contributor

kcgen commented Dec 2, 2021

Rescan in progress.

@kcgen
Copy link
Contributor

kcgen commented Dec 2, 2021

Confirmed good! pvs-analysis-report.zip

@Cyan4973 Cyan4973 merged commit c4716ae into dev Dec 2, 2021
@Cyan4973 Cyan4973 deleted the fix627 branch July 20, 2023 21:08
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.

0.8.1: PVS Studio flagged a potential micro-optimization using a const-reference argument
2 participants