mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-12 11:49:02 +08:00
fix a coupe of warnings
This commit is contained in:
parent
71a171c267
commit
37851cfe11
@ -118,8 +118,8 @@ class PartialReduxExpr : ei_no_assignment_operator,
|
|||||||
typedef ResultType result_type; \
|
typedef ResultType result_type; \
|
||||||
template<typename Scalar, int Size> struct Cost \
|
template<typename Scalar, int Size> struct Cost \
|
||||||
{ enum { value = COST }; }; \
|
{ enum { value = COST }; }; \
|
||||||
template<typename Derived> \
|
template<typename XprType> \
|
||||||
inline ResultType operator()(const DenseBase<Derived>& mat) const \
|
inline ResultType operator()(const XprType& mat) const \
|
||||||
{ return mat.MEMBER(); } \
|
{ return mat.MEMBER(); } \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -303,6 +303,8 @@ class AmbiVector<_Scalar>::Iterator
|
|||||||
m_isDense = m_vector.m_mode==IsDense;
|
m_isDense = m_vector.m_mode==IsDense;
|
||||||
if (m_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;
|
m_cachedIndex = m_vector.m_start-1;
|
||||||
++(*this);
|
++(*this);
|
||||||
}
|
}
|
||||||
@ -314,6 +316,7 @@ class AmbiVector<_Scalar>::Iterator
|
|||||||
m_currentEl = llElements[m_currentEl].next;
|
m_currentEl = llElements[m_currentEl].next;
|
||||||
if (m_currentEl<0)
|
if (m_currentEl<0)
|
||||||
{
|
{
|
||||||
|
m_cachedValue = 0; // this is to avoid a compilation warning
|
||||||
m_cachedIndex = -1;
|
m_cachedIndex = -1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -126,6 +126,7 @@ class ei_sparse_cwise_binary_op_inner_iterator_selector<BinaryOp, Lhs, Rhs, Deri
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
m_value = 0; // this is to avoid a compilation warning
|
||||||
m_id = -1;
|
m_id = -1;
|
||||||
}
|
}
|
||||||
return *static_cast<Derived*>(this);
|
return *static_cast<Derived*>(this);
|
||||||
|
@ -33,8 +33,8 @@ struct ei_traits<SparseTriangularView<MatrixType,Mode> >
|
|||||||
template<typename MatrixType, int Mode> class SparseTriangularView
|
template<typename MatrixType, int Mode> class SparseTriangularView
|
||||||
: public SparseMatrixBase<SparseTriangularView<MatrixType,Mode> >
|
: public SparseMatrixBase<SparseTriangularView<MatrixType,Mode> >
|
||||||
{
|
{
|
||||||
enum { SkipFirst = (Mode==LowerTriangular && (!MatrixType::Flags&RowMajorBit))
|
enum { SkipFirst = (Mode==LowerTriangular && !(MatrixType::Flags&RowMajorBit))
|
||||||
|| (Mode==UpperTriangular && ( MatrixType::Flags&RowMajorBit)) };
|
|| (Mode==UpperTriangular && (MatrixType::Flags&RowMajorBit)) };
|
||||||
public:
|
public:
|
||||||
|
|
||||||
class InnerIterator;
|
class InnerIterator;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user