From b8fabec474baf2a6de66db2b6ecefb674bd1db2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 19 May 2018 15:05:44 +0200 Subject: [PATCH] Math: remove unused variables from tests. Thanks, Clang 6. --- src/Magnum/Math/Test/BezierTest.cpp | 1 - src/Magnum/Math/Test/UnitTest.cpp | 15 +++++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/Magnum/Math/Test/BezierTest.cpp b/src/Magnum/Math/Test/BezierTest.cpp index c3728205e..b8bc58419 100644 --- a/src/Magnum/Math/Test/BezierTest.cpp +++ b/src/Magnum/Math/Test/BezierTest.cpp @@ -221,7 +221,6 @@ void BezierTest::valueQuadratic() { } void BezierTest::valueCubic() { - Vector2 p0(0.0f, 0.0f), p1(10.0f, 15.0f), p2(20.0f, 4.0f), p3(5.0f, -20.0f); CubicBezier2D bezier{Vector2{0.0f, 0.0f}, Vector2{10.0f, 15.0f}, Vector2{20.0f, 4.0f}, Vector2{5.0f, -20.0f}}; CORRADE_COMPARE(bezier.value(0.2f), (Vector2{5.8f, 5.984f})); diff --git a/src/Magnum/Math/Test/UnitTest.cpp b/src/Magnum/Math/Test/UnitTest.cpp index 445d8dc03..308bfa475 100644 --- a/src/Magnum/Math/Test/UnitTest.cpp +++ b/src/Magnum/Math/Test/UnitTest.cpp @@ -172,17 +172,16 @@ void UnitTest::addSubtract() { void UnitTest::multiplyDivide() { constexpr Sec a(3.0f); constexpr Sec b(-4.5f); - constexpr Sec c(5.0f); - constexpr Sec d = a*-1.5f; - constexpr Sec e = -1.5f*a; - constexpr Sec f = b/-1.5f; + constexpr Sec c = a*-1.5f; + constexpr Sec d = -1.5f*a; + constexpr Sec e = b/-1.5f; + CORRADE_COMPARE(c, b); CORRADE_COMPARE(d, b); - CORRADE_COMPARE(e, b); - CORRADE_COMPARE(f, a); + CORRADE_COMPARE(e, a); - constexpr Float g = b/a; - CORRADE_COMPARE(g, -1.5f); + constexpr Float f = b/a; + CORRADE_COMPARE(f, -1.5f); } }}}