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

Update getUsage type to float #1436

Merged
merged 4 commits into from
May 10, 2024

Conversation

ayrtondenner
Copy link
Contributor

Since getUsage is returning the result of a division operation, it makes more sense the function return be float instead of int.

  • Updated texts format and number comparisons to proper float type
  • Added const and auto modifiers whenever possible
  • Removed unnecessary std::round at getUsage

Obs.: as indicated by the branch name, my original idea was to convert it to double, but then I checked that all existing references to getUsage function are already using float.

@FilmBoy84
Copy link
Collaborator

Very nice and good reasoning for the change
As with the other PR i'll aim to test this over next few days and see if anything breaks
LGTM on the changes though :)

@FilmBoy84
Copy link
Collaborator

Couldn't see anything wrong in testing
Merging

Thanks for the PR 🍻

@FilmBoy84 FilmBoy84 merged commit 5c9f30f into OpenApoc:master May 10, 2024
3 checks passed
@ayrtondenner ayrtondenner deleted the update-usage-type-to-double branch May 10, 2024 17:30
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.

None yet

2 participants