diff options
author | Isak Fyksen <isak.fyksen@qt.io> | 2024-03-05 15:51:24 +0100 |
---|---|---|
committer | Isak Fyksen <isak.fyksen@qt.io> | 2024-03-16 15:41:03 +0100 |
commit | 6946a468274fc441cfed7e8865872032c2468ebb (patch) | |
tree | 39da0cb3850c8397e3fa77a3184de3920d8671e4 | |
parent | be84e3216c7a812530f7e26ec58f8f49b9b9ab83 (diff) |
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 <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
-rw-r--r-- | tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<bool>("isEqual"); const F zero(0), one(1), ten(10); const F huge = Fuzzy<F>::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; |