mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-15 07:10:37 +08:00
Fix uninitialized variable warning in SparseQR
This commit is contained in:
parent
953ec08089
commit
6a3423da80
@ -447,7 +447,7 @@ void SparseQR<MatrixType,OrderingType>::factorize(const MatrixType& mat)
|
||||
}
|
||||
} // End update current column
|
||||
|
||||
Scalar tau;
|
||||
Scalar tau = RealScalar(0);
|
||||
RealScalar beta = 0;
|
||||
|
||||
if(nonzeroCol < diagSize)
|
||||
@ -461,7 +461,6 @@ void SparseQR<MatrixType,OrderingType>::factorize(const MatrixType& mat)
|
||||
for (Index itq = 1; itq < nzcolQ; ++itq) sqrNorm += numext::abs2(tval(Qidx(itq)));
|
||||
if(sqrNorm == RealScalar(0) && numext::imag(c0) == RealScalar(0))
|
||||
{
|
||||
tau = RealScalar(0);
|
||||
beta = numext::real(c0);
|
||||
tval(Qidx(0)) = 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user