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 implicit conversion from float to double warnings #1387

Merged
merged 1 commit into from
Jan 17, 2025

Conversation

MatejFranceskin
Copy link
Contributor

Converted constants from double to float to avoid compiler "warning: implicit conversion from 'float' to 'double'".

@jgromes
Copy link
Owner

jgromes commented Jan 14, 2025

Thank you for the contribution - it will take me some time to go through it to double-check all of those are really supposed to be floats. I will also have to fix the conflict that just got introduced by merging #1388 ...

BTW, which warning did you enable to get this? I thought we should have nearly all enabled in the CI, but this was not in there ... thanks!

@MatejFranceskin
Copy link
Contributor Author

MatejFranceskin commented Jan 15, 2025

The option seems to be -Wdouble-promotion
warning: implicit conversion from 'float' to 'double' to match other operand of binary expression [-Wdouble-promotion]
The way I see it is that you never use doubles so it is just better to have float constants.

I resolved the conflicts.

@jgromes jgromes merged commit 6fb3c09 into jgromes:master Jan 17, 2025
28 of 31 checks passed
@jgromes
Copy link
Owner

jgromes commented Jan 17, 2025

Thank you so much - I went through the changes and it all looks good, so merged. The CI fails are unrelated and can be ignored. I will also add the appropriate flag to the CMake.

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.

2 participants