QCborValue: fix build with GCC 13: extended FP support
qcborvalue.cpp:892:32: error: converting to ‘qfloat16::NativeType’ {aka ‘_Float16’} from ‘float’ with greater conversion rank [-Werror] Pick-to: 6.5 Change-Id: Ide4dbd0777a44ed0870efffd173906b7cf7c1619 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
This commit is contained in:
parent
1d43cbfede
commit
d079ca3429
@ -889,7 +889,7 @@ static void writeDoubleToCbor(QCborStreamWriter &writer, double d, QCborValue::E
|
|||||||
// no data loss, we could use float
|
// no data loss, we could use float
|
||||||
#ifndef QT_BOOTSTRAPPED
|
#ifndef QT_BOOTSTRAPPED
|
||||||
if ((opt & QCborValue::UseFloat16) == QCborValue::UseFloat16) {
|
if ((opt & QCborValue::UseFloat16) == QCborValue::UseFloat16) {
|
||||||
qfloat16 f16 = f;
|
qfloat16 f16 = qfloat16(f);
|
||||||
if (f16 == f)
|
if (f16 == f)
|
||||||
return writer.append(f16);
|
return writer.append(f16);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user