cn-cbor
cn-cbor copied to clipboard
cn-encoder: Fix -Wdouble-promotion by explicit cast
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.