From 0b555a4a3d97b6a9aac0f1057dbe116e35e8830e Mon Sep 17 00:00:00 2001 From: Thomas Capricelli Date: Fri, 4 Feb 2011 13:55:12 +0100 Subject: [PATCH] fix misc warnings --- Eigen/src/Core/ArrayBase.h | 4 ++-- Eigen/src/Core/MatrixBase.h | 4 ++-- unsupported/Eigen/src/NonLinearOptimization/chkder.h | 3 ++- unsupported/Eigen/src/NonLinearOptimization/rwupdt.h | 12 +++++------- 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/Eigen/src/Core/ArrayBase.h b/Eigen/src/Core/ArrayBase.h index f85178374..f36883168 100644 --- a/Eigen/src/Core/ArrayBase.h +++ b/Eigen/src/Core/ArrayBase.h @@ -170,10 +170,10 @@ template class ArrayBase template explicit ArrayBase(const ArrayBase&); protected: // mixing arrays and matrices is not legal - template Derived& operator+=(const MatrixBase& mat) + template Derived& operator+=(const MatrixBase& ) {EIGEN_STATIC_ASSERT(sizeof(typename OtherDerived::Scalar)==-1,YOU_CANNOT_MIX_ARRAYS_AND_MATRICES);} // mixing arrays and matrices is not legal - template Derived& operator-=(const MatrixBase& mat) + template Derived& operator-=(const MatrixBase& ) {EIGEN_STATIC_ASSERT(sizeof(typename OtherDerived::Scalar)==-1,YOU_CANNOT_MIX_ARRAYS_AND_MATRICES);} }; diff --git a/Eigen/src/Core/MatrixBase.h b/Eigen/src/Core/MatrixBase.h index c62311469..c98da062f 100644 --- a/Eigen/src/Core/MatrixBase.h +++ b/Eigen/src/Core/MatrixBase.h @@ -507,10 +507,10 @@ template class MatrixBase template explicit MatrixBase(const MatrixBase&); protected: // mixing arrays and matrices is not legal - template Derived& operator+=(const ArrayBase& array) + template Derived& operator+=(const ArrayBase& ) {EIGEN_STATIC_ASSERT(sizeof(typename OtherDerived::Scalar)==-1,YOU_CANNOT_MIX_ARRAYS_AND_MATRICES);} // mixing arrays and matrices is not legal - template Derived& operator-=(const ArrayBase& array) + template Derived& operator-=(const ArrayBase& ) {EIGEN_STATIC_ASSERT(sizeof(typename OtherDerived::Scalar)==-1,YOU_CANNOT_MIX_ARRAYS_AND_MATRICES);} }; diff --git a/unsupported/Eigen/src/NonLinearOptimization/chkder.h b/unsupported/Eigen/src/NonLinearOptimization/chkder.h index e2bdf923c..bc0cb1880 100644 --- a/unsupported/Eigen/src/NonLinearOptimization/chkder.h +++ b/unsupported/Eigen/src/NonLinearOptimization/chkder.h @@ -56,4 +56,5 @@ void chkder( } } -} // end namespace internal \ No newline at end of file +} // end namespace internal + diff --git a/unsupported/Eigen/src/NonLinearOptimization/rwupdt.h b/unsupported/Eigen/src/NonLinearOptimization/rwupdt.h index 96263f8c0..ab83f9b25 100644 --- a/unsupported/Eigen/src/NonLinearOptimization/rwupdt.h +++ b/unsupported/Eigen/src/NonLinearOptimization/rwupdt.h @@ -28,15 +28,12 @@ void rwupdt( r(i,j) = temp; } - if (rowj == 0.) - { - givens[j] = JacobiRotation(1,0); - continue; - } - /* determine a givens rotation which eliminates w(j). */ givens[j].makeGivens(-r(j,j), rowj); + if (rowj == 0.) + continue; // givens[j] is identity + /* apply the current transformation to r(j,j), b(j), and alpha. */ r(j,j) = givens[j].c() * r(j,j) + givens[j].s() * rowj; temp = givens[j].c() * b[j] + givens[j].s() * alpha; @@ -45,4 +42,5 @@ void rwupdt( } } -} // end namespace internal \ No newline at end of file +} // end namespace internal +