From 5e5987996f4a5e9cfda7122c5a0ee09cf4d3874b Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Thu, 19 Jul 2018 18:33:53 +0200 Subject: Fix stupid error in Quaternion move ctor --- Eigen/src/Geometry/Quaternion.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'Eigen/src/Geometry/Quaternion.h') diff --git a/Eigen/src/Geometry/Quaternion.h b/Eigen/src/Geometry/Quaternion.h index 8b203dc71..faea62f17 100644 --- a/Eigen/src/Geometry/Quaternion.h +++ b/Eigen/src/Geometry/Quaternion.h @@ -280,9 +280,8 @@ public: // We define a copy constructor, which means we don't get an implicit move constructor or assignment operator. /** Default move constructor */ EIGEN_DEVICE_FUNC inline Quaternion(Quaternion&& other) EIGEN_NOEXCEPT_IF(std::is_nothrow_move_constructible::value) - { - m_coeffs(std::move(other.coeffs())); - } + : m_coeffs(std::move(other.coeffs())) + {} /** Default move assignment operator */ EIGEN_DEVICE_FUNC Quaternion& operator=(Quaternion&& other) EIGEN_NOEXCEPT_IF(std::is_nothrow_move_assignable::value) @@ -294,9 +293,8 @@ public: // And now because we declared a constructor, we don't get an implicit copy constructor. Say we want one. /** Default copy constructor */ EIGEN_DEVICE_FUNC Quaternion(const Quaternion& other) - { - m_coeffs = other.coeffs(); - } + : m_coeffs(other.coeffs()) + {} #endif EIGEN_DEVICE_FUNC static Quaternion UnitRandom(); -- cgit v1.2.3