From 19d9c835e0c541cd106ade734b9d6b5f36622c28 Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Mon, 16 Aug 2010 11:11:43 -0400 Subject: [PATCH] fix warnings --- Eigen/src/Geometry/Transform.h | 22 +++++++++++----------- Eigen/src/Geometry/arch/Geometry_SSE.h | 2 ++ 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/Eigen/src/Geometry/Transform.h b/Eigen/src/Geometry/Transform.h index 9bef872ee..5a0bb5e29 100644 --- a/Eigen/src/Geometry/Transform.h +++ b/Eigen/src/Geometry/Transform.h @@ -243,7 +243,7 @@ public: template inline Transform(const Transform& other) { - ei_assert(OtherMode!=Projective && "You cannot directly assign a projective transform to an affine one."); + ei_assert(OtherMode!=int(Projective) && "You cannot directly assign a projective transform to an affine one."); typedef typename Transform::MatrixType OtherMatrixType; ei_transform_construct_from_matrix::run(this, other.matrix()); } @@ -618,7 +618,7 @@ Transform& Transform::scale(const MatrixBase &other) { EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(OtherDerived,int(Dim)) - EIGEN_STATIC_ASSERT(Mode!=Isometry, THIS_METHOD_IS_ONLY_FOR_SPECIFIC_TRANSFORMATIONS) + EIGEN_STATIC_ASSERT(Mode!=int(Isometry), THIS_METHOD_IS_ONLY_FOR_SPECIFIC_TRANSFORMATIONS) linearExt().noalias() = (linearExt() * other.asDiagonal()); return *this; } @@ -630,7 +630,7 @@ Transform::scale(const MatrixBase &other) template inline Transform& Transform::scale(Scalar s) { - EIGEN_STATIC_ASSERT(Mode!=Isometry, THIS_METHOD_IS_ONLY_FOR_SPECIFIC_TRANSFORMATIONS) + EIGEN_STATIC_ASSERT(Mode!=int(Isometry), THIS_METHOD_IS_ONLY_FOR_SPECIFIC_TRANSFORMATIONS) linearExt() *= s; return *this; } @@ -645,7 +645,7 @@ Transform& Transform::prescale(const MatrixBase &other) { EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(OtherDerived,int(Dim)) - EIGEN_STATIC_ASSERT(Mode!=Isometry, THIS_METHOD_IS_ONLY_FOR_SPECIFIC_TRANSFORMATIONS) + EIGEN_STATIC_ASSERT(Mode!=int(Isometry), THIS_METHOD_IS_ONLY_FOR_SPECIFIC_TRANSFORMATIONS) m_matrix.template block(0,0).noalias() = (other.asDiagonal() * m_matrix.template block(0,0)); return *this; } @@ -657,7 +657,7 @@ Transform::prescale(const MatrixBase &other) template inline Transform& Transform::prescale(Scalar s) { - EIGEN_STATIC_ASSERT(Mode!=Isometry, THIS_METHOD_IS_ONLY_FOR_SPECIFIC_TRANSFORMATIONS) + EIGEN_STATIC_ASSERT(Mode!=int(Isometry), THIS_METHOD_IS_ONLY_FOR_SPECIFIC_TRANSFORMATIONS) m_matrix.template topRows() *= s; return *this; } @@ -746,7 +746,7 @@ Transform& Transform::shear(Scalar sx, Scalar sy) { EIGEN_STATIC_ASSERT(int(Dim)==2, YOU_MADE_A_PROGRAMMING_MISTAKE) - EIGEN_STATIC_ASSERT(Mode!=Isometry, THIS_METHOD_IS_ONLY_FOR_SPECIFIC_TRANSFORMATIONS) + EIGEN_STATIC_ASSERT(Mode!=int(Isometry), THIS_METHOD_IS_ONLY_FOR_SPECIFIC_TRANSFORMATIONS) VectorType tmp = linear().col(0)*sy + linear().col(1); linear() << linear().col(0) + linear().col(1)*sx, tmp; return *this; @@ -762,7 +762,7 @@ Transform& Transform::preshear(Scalar sx, Scalar sy) { EIGEN_STATIC_ASSERT(int(Dim)==2, YOU_MADE_A_PROGRAMMING_MISTAKE) - EIGEN_STATIC_ASSERT(Mode!=Isometry, THIS_METHOD_IS_ONLY_FOR_SPECIFIC_TRANSFORMATIONS) + EIGEN_STATIC_ASSERT(Mode!=int(Isometry), THIS_METHOD_IS_ONLY_FOR_SPECIFIC_TRANSFORMATIONS) m_matrix.template block(0,0) = LinearMatrixType(1, sx, sy, 1) * m_matrix.template block(0,0); return *this; } @@ -1127,7 +1127,7 @@ struct ei_transform_right_product_impl TransformType res; res.matrix().col(Dim) = tr.matrix().col(Dim); res.linearExt().noalias() = (tr.linearExt() * other); - if(Mode==Affine) + if(Mode==int(Affine)) res.matrix().row(Dim).template head() = tr.matrix().row(Dim).template head(); return res; } @@ -1143,10 +1143,10 @@ struct ei_transform_right_product_impl static ResultType run(const TransformType& tr, const Other& other) { TransformType res; - enum { Rows = Mode==Projective ? HDim : Dim }; + enum { Rows = Mode==int(Projective) ? HDim : Dim }; res.matrix().template block(0,0).noalias() = (tr.linearExt() * other); res.translationExt() += tr.translationExt(); - if(Mode!=Affine) + if(Mode!=int(Affine)) res.makeAffine(); return res; } @@ -1248,7 +1248,7 @@ struct ei_transform_left_product_impl static ResultType run(const Other& other, const TransformType& tr) { TransformType res; - if(Mode!=AffineCompact) + if(Mode!=int(AffineCompact)) res.matrix().row(Dim) = tr.matrix().row(Dim); res.matrix().template topRows().noalias() = other * tr.matrix().template topRows(); diff --git a/Eigen/src/Geometry/arch/Geometry_SSE.h b/Eigen/src/Geometry/arch/Geometry_SSE.h index 77dcecf54..798d81c91 100644 --- a/Eigen/src/Geometry/arch/Geometry_SSE.h +++ b/Eigen/src/Geometry/arch/Geometry_SSE.h @@ -95,6 +95,7 @@ struct ei_quat_product