aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Sparse
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2010-01-05 10:15:29 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2010-01-05 10:15:29 +0100
commit37851cfe11693a84636b350f5c9fb0ccf993e838 (patch)
tree937a04f18ea6b6e9280562b2c5cad8d4ae9be85a /Eigen/src/Sparse
parent71a171c267df54118cda01d845d42f3d3d465de3 (diff)
fix a coupe of warnings
Diffstat (limited to 'Eigen/src/Sparse')
-rw-r--r--Eigen/src/Sparse/AmbiVector.h3
-rw-r--r--Eigen/src/Sparse/SparseCwiseBinaryOp.h1
-rw-r--r--Eigen/src/Sparse/SparseTriangularView.h4
3 files changed, 6 insertions, 2 deletions
diff --git a/Eigen/src/Sparse/AmbiVector.h b/Eigen/src/Sparse/AmbiVector.h
index 2988999d6..6bb6ee3e4 100644
--- a/Eigen/src/Sparse/AmbiVector.h
+++ b/Eigen/src/Sparse/AmbiVector.h
@@ -303,6 +303,8 @@ class AmbiVector<_Scalar>::Iterator
m_isDense = m_vector.m_mode==IsDense;
if (m_isDense)
{
+ m_currentEl = 0; // this is to avoid a compilation warning
+ m_cachedValue = 0; // this is to avoid a compilation warning
m_cachedIndex = m_vector.m_start-1;
++(*this);
}
@@ -314,6 +316,7 @@ class AmbiVector<_Scalar>::Iterator
m_currentEl = llElements[m_currentEl].next;
if (m_currentEl<0)
{
+ m_cachedValue = 0; // this is to avoid a compilation warning
m_cachedIndex = -1;
}
else
diff --git a/Eigen/src/Sparse/SparseCwiseBinaryOp.h b/Eigen/src/Sparse/SparseCwiseBinaryOp.h
index 4f8221787..ce6efed1e 100644
--- a/Eigen/src/Sparse/SparseCwiseBinaryOp.h
+++ b/Eigen/src/Sparse/SparseCwiseBinaryOp.h
@@ -126,6 +126,7 @@ class ei_sparse_cwise_binary_op_inner_iterator_selector<BinaryOp, Lhs, Rhs, Deri
}
else
{
+ m_value = 0; // this is to avoid a compilation warning
m_id = -1;
}
return *static_cast<Derived*>(this);
diff --git a/Eigen/src/Sparse/SparseTriangularView.h b/Eigen/src/Sparse/SparseTriangularView.h
index 6a9461528..b5eb3d6bd 100644
--- a/Eigen/src/Sparse/SparseTriangularView.h
+++ b/Eigen/src/Sparse/SparseTriangularView.h
@@ -33,8 +33,8 @@ struct ei_traits<SparseTriangularView<MatrixType,Mode> >
template<typename MatrixType, int Mode> class SparseTriangularView
: public SparseMatrixBase<SparseTriangularView<MatrixType,Mode> >
{
- enum { SkipFirst = (Mode==LowerTriangular && (!MatrixType::Flags&RowMajorBit))
- || (Mode==UpperTriangular && ( MatrixType::Flags&RowMajorBit)) };
+ enum { SkipFirst = (Mode==LowerTriangular && !(MatrixType::Flags&RowMajorBit))
+ || (Mode==UpperTriangular && (MatrixType::Flags&RowMajorBit)) };
public:
class InnerIterator;