fix misc warnings, more importantly when NDEBUG is defined, assert() is a

nop.
This commit is contained in:
Thomas Capricelli 2010-03-27 18:58:29 +01:00
parent af08770890
commit 0a5c2d8a54
4 changed files with 4 additions and 6 deletions

View File

@ -296,8 +296,7 @@ template<typename Derived>
bool LLT<MatrixType,_UpLo>::solveInPlace(MatrixBase<Derived> &bAndX) const bool LLT<MatrixType,_UpLo>::solveInPlace(MatrixBase<Derived> &bAndX) const
{ {
ei_assert(m_isInitialized && "LLT is not initialized."); ei_assert(m_isInitialized && "LLT is not initialized.");
const int size = m_matrix.rows(); ei_assert(m_matrix.rows()==bAndX.rows());
ei_assert(size==bAndX.rows());
matrixL().solveInPlace(bAndX); matrixL().solveInPlace(bAndX);
matrixU().solveInPlace(bAndX); matrixU().solveInPlace(bAndX);
return true; return true;

View File

@ -584,7 +584,7 @@ template<typename Derived> class DenseBase
#endif #endif
// disable the use of evalTo for dense objects with a nice compilation error // disable the use of evalTo for dense objects with a nice compilation error
template<typename Dest> inline void evalTo(Dest& dst) const template<typename Dest> inline void evalTo(Dest& ) const
{ {
EIGEN_STATIC_ASSERT((ei_is_same_type<Dest,void>::ret),THE_EVAL_EVALTO_FUNCTION_SHOULD_NEVER_BE_CALLED_FOR_DENSE_OBJECTS); EIGEN_STATIC_ASSERT((ei_is_same_type<Dest,void>::ret),THE_EVAL_EVALTO_FUNCTION_SHOULD_NEVER_BE_CALLED_FOR_DENSE_OBJECTS);
} }

View File

@ -439,8 +439,7 @@ struct ei_solve_retval<PartialPivLU<_MatrixType>, Rhs>
* Step 3: replace c by the solution x to Ux = c. * Step 3: replace c by the solution x to Ux = c.
*/ */
const int size = dec().matrixLU().rows(); ei_assert(rhs().rows() == dec().matrixLU().rows());
ei_assert(rhs().rows() == size);
// Step 1 // Step 1
dst = dec().permutationP() * rhs(); dst = dec().permutationP() * rhs();

View File

@ -320,7 +320,7 @@ class FFT
// if the vector is strided, then we need to copy it to a packed temporary // if the vector is strided, then we need to copy it to a packed temporary
Matrix<src_type,1,Dynamic> tmp; Matrix<src_type,1,Dynamic> tmp;
if ( resize_input ) { if ( resize_input ) {
size_t ncopy = min(src.size(),src.size() + resize_input); size_t ncopy = std::min(src.size(),src.size() + resize_input);
tmp.setZero(src.size() + resize_input); tmp.setZero(src.size() + resize_input);
if ( realfft && HasFlag(HalfSpectrum) ) { if ( realfft && HasFlag(HalfSpectrum) ) {
// pad at the Nyquist bin // pad at the Nyquist bin