Fix various small issues detected by gcc

This commit is contained in:
Gael Guennebaud 2014-08-01 16:24:23 +02:00
parent c2ff44cbf3
commit 107bb308c3
5 changed files with 8 additions and 8 deletions

View File

@ -965,7 +965,7 @@ struct evaluator<PartialReduxExpr<ArgType, MemberOp, Direction> >
typedef PartialReduxExpr<ArgType, MemberOp, Direction> XprType; typedef PartialReduxExpr<ArgType, MemberOp, Direction> XprType;
typedef typename XprType::Scalar InputScalar; typedef typename XprType::Scalar InputScalar;
enum { 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; typedef typename MemberOp::template Cost<InputScalar,int(TraversalSize)> CostOpType;
enum { enum {

View File

@ -375,7 +375,7 @@ public:
#endif #endif
#ifdef EIGEN_TEST_EVALUATORS #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(); } Index cols() const { return m_matrix.cols(); }
#endif #endif

View File

@ -577,7 +577,7 @@ namespace internal {
#ifdef EIGEN_TEST_EVALUATORS #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 > struct unary_evaluator<Block<ArgType,BlockRows,BlockCols,InnerPanel>, IteratorBased >
: public evaluator_base<Block<ArgType,BlockRows,BlockCols,InnerPanel> > : 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; 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 class unary_evaluator<Block<ArgType,BlockRows,BlockCols,InnerPanel>, IteratorBased>::InnerVectorInnerIterator
: public EvalIterator : public EvalIterator
{ {
@ -640,7 +640,7 @@ public:
inline operator bool() const { return EvalIterator::operator bool() && EvalIterator::index() < m_end; } 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 class unary_evaluator<Block<ArgType,BlockRows,BlockCols,InnerPanel>, IteratorBased>::OuterVectorInnerIterator
{ {
const unary_evaluator& m_eval; const unary_evaluator& m_eval;

View File

@ -200,7 +200,7 @@ public:
public: public:
EIGEN_STRONG_INLINE InnerIterator(const unary_evaluator& xprEval, Index outer) 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) if(SkipFirst)
{ {

View File

@ -178,7 +178,7 @@ class SparseQR
y.resize((std::max)(cols(),Index(y.rows())),y.cols()); y.resize((std::max)(cols(),Index(y.rows())),y.cols());
y.topRows(rank) = this->matrixR().topLeftCorner(rank, rank).template triangularView<Upper>().solve(b.topRows(rank)); y.topRows(rank) = this->matrixR().topLeftCorner(rank, rank).template triangularView<Upper>().solve(b.topRows(rank));
y.bottomRows(y.rows()-rank).setZero(); y.bottomRows(y.rows()-rank).setZero();
// Apply the column permutation // Apply the column permutation
if (m_perm_c.size()) dest = colsPermutation() * y.topRows(cols()); if (m_perm_c.size()) dest = colsPermutation() * y.topRows(cols());
else dest = y.topRows(cols()); else dest = y.topRows(cols());
@ -447,7 +447,7 @@ void SparseQR<MatrixType,OrderingType>::factorize(const MatrixType& mat)
} }
} // End update current column } // End update current column
Scalar tau; Scalar tau = 0;
RealScalar beta = 0; RealScalar beta = 0;
if(nonzeroCol < diagSize) if(nonzeroCol < diagSize)