mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-04 18:54:00 +08:00
Avoid -Wunused warnings in NDEBUG builds.
In two places in SuperLUSupport.h, a local variable 'size' is created that is used only inside an eigen_assert. Remove these, just fetch the required values inside the assert statements. This avoids annoying -Wunused warnings (and -Werror=unused errors) in NDEBUG builds.
This commit is contained in:
parent
622c598944
commit
db61b8d478
@ -650,9 +650,8 @@ void SuperLU<MatrixType>::_solve_impl(const MatrixBase<Rhs> &b, MatrixBase<Dest>
|
||||
{
|
||||
eigen_assert(m_factorizationIsOk && "The decomposition is not in a valid state for solving, you must first call either compute() or analyzePattern()/factorize()");
|
||||
|
||||
const Index size = m_matrix.rows();
|
||||
const Index rhsCols = b.cols();
|
||||
eigen_assert(size==b.rows());
|
||||
eigen_assert(m_matrix.rows()==b.rows());
|
||||
|
||||
m_sluOptions.Trans = NOTRANS;
|
||||
m_sluOptions.Fact = FACTORED;
|
||||
@ -974,9 +973,8 @@ void SuperILU<MatrixType>::_solve_impl(const MatrixBase<Rhs> &b, MatrixBase<Dest
|
||||
{
|
||||
eigen_assert(m_factorizationIsOk && "The decomposition is not in a valid state for solving, you must first call either compute() or analyzePattern()/factorize()");
|
||||
|
||||
const int size = m_matrix.rows();
|
||||
const int rhsCols = b.cols();
|
||||
eigen_assert(size==b.rows());
|
||||
eigen_assert(m_matrix.rows()==b.rows());
|
||||
|
||||
m_sluOptions.Trans = NOTRANS;
|
||||
m_sluOptions.Fact = FACTORED;
|
||||
|
Loading…
x
Reference in New Issue
Block a user