aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2012-02-06 15:57:51 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2012-02-06 15:57:51 +0100
commit99c694623a5bf8ec3c3c6fbe9c044a09eb7dcd5b (patch)
tree9b2ad8528ca1c97c6830e2ee3bd12bc6f7ca3da6
parent6ad48c5d92e168ccece5fc9c608d2f1fc8a4009d (diff)
fix a dozen of warnings with MSVC, and get rid of some useless throw()
-rw-r--r--Eigen/src/Core/SolveTriangular.h6
-rw-r--r--Eigen/src/Core/util/Memory.h12
-rw-r--r--Eigen/src/Geometry/OrthoMethods.h2
-rw-r--r--Eigen/src/SparseCore/SparseBlock.h12
-rw-r--r--Eigen/src/SparseCore/SparseVector.h2
-rw-r--r--Eigen/src/SparseCore/TriangularSolver.h12
6 files changed, 20 insertions, 26 deletions
diff --git a/Eigen/src/Core/SolveTriangular.h b/Eigen/src/Core/SolveTriangular.h
index bd3cab328..def5116d5 100644
--- a/Eigen/src/Core/SolveTriangular.h
+++ b/Eigen/src/Core/SolveTriangular.h
@@ -177,10 +177,8 @@ template<int Side, typename OtherDerived>
void TriangularView<MatrixType,Mode>::solveInPlace(const MatrixBase<OtherDerived>& _other) const
{
OtherDerived& other = _other.const_cast_derived();
- eigen_assert(cols() == rows());
- eigen_assert( (Side==OnTheLeft && cols() == other.rows()) || (Side==OnTheRight && cols() == other.cols()) );
- eigen_assert(!(Mode & ZeroDiag));
- eigen_assert(Mode & (Upper|Lower));
+ eigen_assert( cols() == rows() && ((Side==OnTheLeft && cols() == other.rows()) || (Side==OnTheRight && cols() == other.cols())) );
+ eigen_assert((!(Mode & ZeroDiag)) && bool(Mode & (Upper|Lower)));
enum { copy = internal::traits<OtherDerived>::Flags & RowMajorBit && OtherDerived::IsVectorAtCompileTime };
typedef typename internal::conditional<copy,
diff --git a/Eigen/src/Core/util/Memory.h b/Eigen/src/Core/util/Memory.h
index 79fa9e8be..7134d245b 100644
--- a/Eigen/src/Core/util/Memory.h
+++ b/Eigen/src/Core/util/Memory.h
@@ -640,7 +640,7 @@ template<typename T> class aligned_stack_memory_handler
#define EIGEN_MAKE_ALIGNED_OPERATOR_NEW EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(true)
#define EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(Scalar,Size) \
- EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(((Size)!=Eigen::Dynamic) && ((sizeof(Scalar)*(Size))%16==0))
+ EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(bool(((Size)!=Eigen::Dynamic) && ((sizeof(Scalar)*(Size))%16==0)))
/****************************************************************************/
@@ -688,24 +688,24 @@ public:
return &value;
}
- aligned_allocator() throw( )
+ aligned_allocator()
{
}
- aligned_allocator( const aligned_allocator& ) throw( )
+ aligned_allocator( const aligned_allocator& )
{
}
template<class U>
- aligned_allocator( const aligned_allocator<U>& ) throw( )
+ aligned_allocator( const aligned_allocator<U>& )
{
}
- ~aligned_allocator() throw( )
+ ~aligned_allocator()
{
}
- size_type max_size() const throw( )
+ size_type max_size() const
{
return (std::numeric_limits<size_type>::max)();
}
diff --git a/Eigen/src/Geometry/OrthoMethods.h b/Eigen/src/Geometry/OrthoMethods.h
index 895442333..d317ca113 100644
--- a/Eigen/src/Geometry/OrthoMethods.h
+++ b/Eigen/src/Geometry/OrthoMethods.h
@@ -56,7 +56,7 @@ namespace internal {
template< int Arch,typename VectorLhs,typename VectorRhs,
typename Scalar = typename VectorLhs::Scalar,
- bool Vectorizable = (VectorLhs::Flags&VectorRhs::Flags)&PacketAccessBit>
+ bool Vectorizable = bool((VectorLhs::Flags&VectorRhs::Flags)&PacketAccessBit)>
struct cross3_impl {
static inline typename internal::plain_matrix_type<VectorLhs>::type
run(const VectorLhs& lhs, const VectorRhs& rhs)
diff --git a/Eigen/src/SparseCore/SparseBlock.h b/Eigen/src/SparseCore/SparseBlock.h
index d60cd0f11..e053ccd6b 100644
--- a/Eigen/src/SparseCore/SparseBlock.h
+++ b/Eigen/src/SparseCore/SparseBlock.h
@@ -153,12 +153,12 @@ class SparseInnerVectorSet<SparseMatrix<_Scalar, _Options, _Index>, Size>
SparseMatrix<Scalar, IsRowMajor ? RowMajor : ColMajor, Index> tmp(other);
// 2 - let's check whether there is enough allocated memory
- Index nnz = tmp.nonZeros();
- Index nnz_previous = nonZeros();
- Index free_size = matrix.data().allocatedSize() + nnz_previous;
- std::size_t nnz_head = m_outerStart==0 ? 0 : matrix.outerIndexPtr()[m_outerStart];
- std::size_t tail = m_matrix.outerIndexPtr()[m_outerStart+m_outerSize.value()];
- std::size_t nnz_tail = matrix.nonZeros() - tail;
+ Index nnz = tmp.nonZeros();
+ Index nnz_previous = nonZeros();
+ Index free_size = Index(matrix.data().allocatedSize()) + nnz_previous;
+ Index nnz_head = m_outerStart==0 ? 0 : matrix.outerIndexPtr()[m_outerStart];
+ Index tail = m_matrix.outerIndexPtr()[m_outerStart+m_outerSize.value()];
+ Index nnz_tail = matrix.nonZeros() - tail;
if(nnz>free_size)
{
diff --git a/Eigen/src/SparseCore/SparseVector.h b/Eigen/src/SparseCore/SparseVector.h
index 139ce0c31..40efc89e4 100644
--- a/Eigen/src/SparseCore/SparseVector.h
+++ b/Eigen/src/SparseCore/SparseVector.h
@@ -160,7 +160,7 @@ class SparseVector
Scalar& insert(Index i)
{
Index startId = 0;
- Index p = m_data.size() - 1;
+ Index p = Index(m_data.size()) - 1;
// TODO smart realloc
m_data.resize(p+2,1);
diff --git a/Eigen/src/SparseCore/TriangularSolver.h b/Eigen/src/SparseCore/TriangularSolver.h
index 5fab9e487..8ed471e45 100644
--- a/Eigen/src/SparseCore/TriangularSolver.h
+++ b/Eigen/src/SparseCore/TriangularSolver.h
@@ -177,10 +177,8 @@ template<typename ExpressionType,int Mode>
template<typename OtherDerived>
void SparseTriangularView<ExpressionType,Mode>::solveInPlace(MatrixBase<OtherDerived>& other) const
{
- eigen_assert(m_matrix.cols() == m_matrix.rows());
- eigen_assert(m_matrix.cols() == other.rows());
- eigen_assert(!(Mode & ZeroDiag));
- eigen_assert(Mode & (Upper|Lower));
+ eigen_assert(m_matrix.cols() == m_matrix.rows() && m_matrix.cols() == other.rows());
+ eigen_assert((!(Mode & ZeroDiag)) && bool(Mode & (Upper|Lower)));
enum { copy = internal::traits<OtherDerived>::Flags & RowMajorBit };
@@ -304,10 +302,8 @@ template<typename ExpressionType,int Mode>
template<typename OtherDerived>
void SparseTriangularView<ExpressionType,Mode>::solveInPlace(SparseMatrixBase<OtherDerived>& other) const
{
- eigen_assert(m_matrix.cols() == m_matrix.rows());
- eigen_assert(m_matrix.cols() == other.rows());
- eigen_assert(!(Mode & ZeroDiag));
- eigen_assert(Mode & (Upper|Lower));
+ eigen_assert(m_matrix.cols() == m_matrix.rows() && m_matrix.cols() == other.rows());
+ eigen_assert( (!(Mode & ZeroDiag)) && bool(Mode & (Upper|Lower)));
// enum { copy = internal::traits<OtherDerived>::Flags & RowMajorBit };