From 6946a468274fc441cfed7e8865872032c2468ebb Mon Sep 17 00:00:00 2001 From: Isak Fyksen Date: Tue, 5 Mar 2024 15:51:24 +0100 Subject: [PATCH] Fix truncation warnings in tst_qnumeric Add `f`-suffix to float assignments to avoid implicit conversion from double to float. Fixes: QTBUG-122303 Change-Id: I456e2952fe8c96783ab116ac4cb56a28b38de9d0 Reviewed-by: Thiago Macieira Reviewed-by: Qt CI Bot Reviewed-by: Edward Welbourne --- tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp b/tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp index 5698e7fb66..d21fabd74e 100644 --- a/tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp +++ b/tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp @@ -91,7 +91,7 @@ void tst_QNumeric::fuzzyCompare_data() QTest::addColumn("isEqual"); const F zero(0), one(1), ten(10); const F huge = Fuzzy::scale, tiny = one / huge; - const F deci(.1), giga(1e9), nano(1e-9), big(1e7), small(1e-10); + const F deci(.1f), giga(1e9f), nano(1e-9f), big(1e7f), small(1e-10f); QTest::newRow("zero") << zero << zero << true; QTest::newRow("ten") << ten << ten << true;