Skip to content
This repository has been archived by the owner on Apr 9, 2020. It is now read-only.

cn-encoder: Fix -Wdouble-promotion by explicit cast #56

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jnohlgard
Copy link

The intention of this line of code is to check whether the conversion to float
reduced the precision of the value, hence the conversion to double is correct
here, but when compiled with GCC's -Wdouble-promotion, this implicit cast to
double will trigger a warning. The fix for the warning is to make the cast
explicit.

The intention of this line of code is to check whether the conversion to float
reduced the precision of the value, hence the conversion to double is correct
here, but when compiled with GCC's -Wdouble-promotion, this implicit cast to
double will trigger a warning. The fix for the warning is to make the cast
explicit.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant