-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Code optimizations reported by static code analysis (2018-11-05) #26548
Conversation
src/faction_camp.cpp
Outdated
units::mass carry_mass, | ||
units::volume carry_volume ) | ||
int talk_function::om_carry_weight_to_trips( const units::mass &mass, const units::volume &volume, | ||
const units::mass &carry_mass, const units::volume &carry_volume ) |
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.
Passing units
types by const reference rather than value is likely going to be a pessimization. From the ABI perspective they're effectively int
s.
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.
Makes sense. I've rolled back these changes.
Summary
SUMMARY: Performance "Code optimizations reported by static code analysis"
Purpose of change
Cleanup code while increase performance.
Describe the solution
See commit messages.