mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Matrix-Market: fix perf issue and infinite loop
This commit is contained in:
@@ -85,7 +85,7 @@ class MatrixMarketIterator
|
||||
Getnextvalidmatrix();
|
||||
return *this;
|
||||
}
|
||||
inline operator bool() { return m_isvalid;}
|
||||
inline operator bool() const { return m_isvalid;}
|
||||
|
||||
/** Return the sparse matrix corresponding to the current file */
|
||||
inline MatrixType& matrix()
|
||||
@@ -186,6 +186,7 @@ class MatrixMarketIterator
|
||||
|
||||
void Getnextvalidmatrix( )
|
||||
{
|
||||
m_isvalid = false;
|
||||
// Here, we return with the next valid matrix in the folder
|
||||
while ( (m_curs_id = readdir(m_folder_id)) != NULL) {
|
||||
m_isvalid = false;
|
||||
|
||||
Reference in New Issue
Block a user