From 1eea843538593ad64ff7dd85316a18c602783c77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 24 Feb 2013 18:12:06 +0100 Subject: [PATCH] Math: don't allow implicit conversion of T to Complex. Brain failure #1. --- src/Math/Complex.h | 2 +- src/Math/Test/ComplexTest.cpp | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Math/Complex.h b/src/Math/Complex.h index 24c25d9dd..603a4a545 100644 --- a/src/Math/Complex.h +++ b/src/Math/Complex.h @@ -94,7 +94,7 @@ template class Complex { * c = a + ib * @f] */ - inline constexpr /*implicit*/ Complex(T real, T imaginary = T(0)): _real(real), _imaginary(imaginary) {} + inline constexpr /*implicit*/ Complex(T real, T imaginary): _real(real), _imaginary(imaginary) {} /** * @brief Construct complex number from vector diff --git a/src/Math/Test/ComplexTest.cpp b/src/Math/Test/ComplexTest.cpp index fcae80108..f9dafcaee 100644 --- a/src/Math/Test/ComplexTest.cpp +++ b/src/Math/Test/ComplexTest.cpp @@ -97,8 +97,6 @@ void ComplexTest::construct() { Complex c(0.5f, -3.7f); CORRADE_COMPARE(c.real(), 0.5f); CORRADE_COMPARE(c.imaginary(), -3.7f); - - CORRADE_COMPARE(Complex(2.0f), Complex(2.0f, 0.0f)); } void ComplexTest::constructDefault() {