From 71c90e6024a530c8195758691dc0b1f040814547 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 16 Mar 2019 02:57:20 +0100 Subject: [PATCH] Math: fix MSVC integer conversion warnings in a test. --- src/Magnum/Math/Test/TypeTraitsTest.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Magnum/Math/Test/TypeTraitsTest.cpp b/src/Magnum/Math/Test/TypeTraitsTest.cpp index 091e1f55f..ca4d25d8b 100644 --- a/src/Magnum/Math/Test/TypeTraitsTest.cpp +++ b/src/Magnum/Math/Test/TypeTraitsTest.cpp @@ -170,9 +170,9 @@ void TypeTraitsTest::name() { template void TypeTraitsTest::equalsIntegral() { setTestCaseName(std::string{"equalsIntegral<"} + TypeTraits::name() + ">"); - CORRADE_VERIFY(TypeTraits::equals(1, 1)); - CORRADE_VERIFY(!TypeTraits::equals(1, -1)); - CORRADE_VERIFY(!TypeTraits::equals(1, 1+TypeTraits::epsilon())); + CORRADE_VERIFY(TypeTraits::equals(T(1), T(1))); + CORRADE_VERIFY(!TypeTraits::equals(T(1), T(-1))); + CORRADE_VERIFY(!TypeTraits::equals(T(1), T(1)+TypeTraits::epsilon())); } template void TypeTraitsTest::equalsFloatingPoint0() { @@ -221,7 +221,7 @@ template void TypeTraitsTest::equalsZeroIntegral() { setTestCaseName(std::string{"equalsZeroIntegral<"} + TypeTraits::name() + ">"); - const T a(-123); + const T a = T(-123); const T magnitude = abs(a); CORRADE_VERIFY(TypeTraits::equals(a, a));