mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-09-16 11:23:14 +08:00
Fix various small issues detected by gcc
This commit is contained in:
parent
c2ff44cbf3
commit
107bb308c3
@ -965,7 +965,7 @@ struct evaluator<PartialReduxExpr<ArgType, MemberOp, Direction> >
|
||||
typedef PartialReduxExpr<ArgType, MemberOp, Direction> XprType;
|
||||
typedef typename XprType::Scalar InputScalar;
|
||||
enum {
|
||||
TraversalSize = Direction==Vertical ? ArgType::RowsAtCompileTime : XprType::ColsAtCompileTime
|
||||
TraversalSize = Direction==int(Vertical) ? int(ArgType::RowsAtCompileTime) : int(XprType::ColsAtCompileTime)
|
||||
};
|
||||
typedef typename MemberOp::template Cost<InputScalar,int(TraversalSize)> CostOpType;
|
||||
enum {
|
||||
|
@ -375,7 +375,7 @@ public:
|
||||
#endif
|
||||
|
||||
#ifdef EIGEN_TEST_EVALUATORS
|
||||
Index rows() const { return Mode==Projective ? m_matrix.cols() : m_matrix.cols()-1; }
|
||||
Index rows() const { return int(Mode)==int(Projective) ? m_matrix.cols() : (m_matrix.cols()-1); }
|
||||
Index cols() const { return m_matrix.cols(); }
|
||||
#endif
|
||||
|
||||
|
@ -577,7 +577,7 @@ namespace internal {
|
||||
#ifdef EIGEN_TEST_EVALUATORS
|
||||
|
||||
//
|
||||
template<typename ArgType, int BlockRows, int BlockCols, int InnerPanel>
|
||||
template<typename ArgType, int BlockRows, int BlockCols, bool InnerPanel>
|
||||
struct unary_evaluator<Block<ArgType,BlockRows,BlockCols,InnerPanel>, IteratorBased >
|
||||
: public evaluator_base<Block<ArgType,BlockRows,BlockCols,InnerPanel> >
|
||||
{
|
||||
@ -615,7 +615,7 @@ struct unary_evaluator<Block<ArgType,BlockRows,BlockCols,InnerPanel>, IteratorBa
|
||||
const XprType &m_block;
|
||||
};
|
||||
|
||||
template<typename ArgType, int BlockRows, int BlockCols, int InnerPanel>
|
||||
template<typename ArgType, int BlockRows, int BlockCols, bool InnerPanel>
|
||||
class unary_evaluator<Block<ArgType,BlockRows,BlockCols,InnerPanel>, IteratorBased>::InnerVectorInnerIterator
|
||||
: public EvalIterator
|
||||
{
|
||||
@ -640,7 +640,7 @@ public:
|
||||
inline operator bool() const { return EvalIterator::operator bool() && EvalIterator::index() < m_end; }
|
||||
};
|
||||
|
||||
template<typename ArgType, int BlockRows, int BlockCols, int InnerPanel>
|
||||
template<typename ArgType, int BlockRows, int BlockCols, bool InnerPanel>
|
||||
class unary_evaluator<Block<ArgType,BlockRows,BlockCols,InnerPanel>, IteratorBased>::OuterVectorInnerIterator
|
||||
{
|
||||
const unary_evaluator& m_eval;
|
||||
|
@ -200,7 +200,7 @@ public:
|
||||
public:
|
||||
|
||||
EIGEN_STRONG_INLINE InnerIterator(const unary_evaluator& xprEval, Index outer)
|
||||
: Base(xprEval.m_argImpl,outer)
|
||||
: Base(xprEval.m_argImpl,outer), m_returnOne(false)
|
||||
{
|
||||
if(SkipFirst)
|
||||
{
|
||||
|
@ -447,7 +447,7 @@ void SparseQR<MatrixType,OrderingType>::factorize(const MatrixType& mat)
|
||||
}
|
||||
} // End update current column
|
||||
|
||||
Scalar tau;
|
||||
Scalar tau = 0;
|
||||
RealScalar beta = 0;
|
||||
|
||||
if(nonzeroCol < diagSize)
|
||||
|
Loading…
x
Reference in New Issue
Block a user