From 432fcefcb1ddffd8293ec2443234232eb64f199c Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Tue, 15 Sep 2009 11:27:31 +0200 Subject: fix warning with gcc 4.2 --- unsupported/Eigen/AlignedVector3 | 60 ++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 30 deletions(-) (limited to 'unsupported/Eigen/AlignedVector3') diff --git a/unsupported/Eigen/AlignedVector3 b/unsupported/Eigen/AlignedVector3 index aaec5f98a..f20fad6d1 100644 --- a/unsupported/Eigen/AlignedVector3 +++ b/unsupported/Eigen/AlignedVector3 @@ -63,37 +63,37 @@ template class AlignedVector3 typedef Matrix<_Scalar,4,1> CoeffType; CoeffType m_coeffs; public: - + EIGEN_GENERIC_PUBLIC_INTERFACE(AlignedVector3) using Base::operator*; - + inline int rows() const { return 3; } inline int cols() const { return 1; } - + inline const Scalar& coeff(int row, int col) const { return m_coeffs.coeff(row, col); } - + inline Scalar& coeffRef(int row, int col) { return m_coeffs.coeffRef(row, col); } - + inline const Scalar& coeff(int index) const { return m_coeffs.coeff(index); } inline Scalar& coeffRef(int index) { return m_coeffs.coeffRef(index);} - - + + inline AlignedVector3(const Scalar& x, const Scalar& y, const Scalar& z) : m_coeffs(x, y, z, Scalar(0)) {} - + inline AlignedVector3(const AlignedVector3& other) - : m_coeffs(other.m_coeffs) + : Base(), m_coeffs(other.m_coeffs) {} - + template struct generic_assign_selector {}; - + template struct generic_assign_selector { inline static void run(AlignedVector3& dest, const XprType& src) @@ -101,7 +101,7 @@ template class AlignedVector3 dest.m_coeffs = src; } }; - + template struct generic_assign_selector { inline static void run(AlignedVector3& dest, const XprType& src) @@ -110,44 +110,44 @@ template class AlignedVector3 dest.m_coeffs.w() = Scalar(0); } }; - + template inline explicit AlignedVector3(const MatrixBase& other) { generic_assign_selector::run(*this,other.derived()); } - + inline AlignedVector3& operator=(const AlignedVector3& other) { m_coeffs = other.m_coeffs; return *this; } - - + + inline AlignedVector3 operator+(const AlignedVector3& other) const { return AlignedVector3(m_coeffs + other.m_coeffs); } - + inline AlignedVector3& operator+=(const AlignedVector3& other) { m_coeffs += other.m_coeffs; return *this; } - + inline AlignedVector3 operator-(const AlignedVector3& other) const { return AlignedVector3(m_coeffs - other.m_coeffs); } - + inline AlignedVector3 operator-=(const AlignedVector3& other) { m_coeffs -= other.m_coeffs; return *this; } - + inline AlignedVector3 operator*(const Scalar& s) const { return AlignedVector3(m_coeffs * s); } - + inline friend AlignedVector3 operator*(const Scalar& s,const AlignedVector3& vec) { return AlignedVector3(s * vec.m_coeffs); } - + inline AlignedVector3& operator*=(const Scalar& s) { m_coeffs *= s; return *this; } - + inline AlignedVector3 operator/(const Scalar& s) const { return AlignedVector3(m_coeffs / s); } - + inline AlignedVector3& operator/=(const Scalar& s) { m_coeffs /= s; return *this; } - + inline Scalar dot(const AlignedVector3& other) const { ei_assert(m_coeffs.w()==Scalar(0)); @@ -164,29 +164,29 @@ template class AlignedVector3 { return AlignedVector3(m_coeffs / norm()); } - + inline Scalar sum() const { ei_assert(m_coeffs.w()==Scalar(0)); return m_coeffs.sum(); } - + inline Scalar squaredNorm() const { ei_assert(m_coeffs.w()==Scalar(0)); return m_coeffs.squaredNorm(); } - + inline Scalar norm() const { return ei_sqrt(squaredNorm()); } - + inline AlignedVector3 cross(const AlignedVector3& other) const { return AlignedVector3(m_coeffs.cross3(other.m_coeffs)); } - + template inline bool isApprox(const MatrixBase& other, RealScalar eps=precision()) const { -- cgit v1.2.3