Fix more shadowing typedefs

This commit is contained in:
Christoph Hertzberg
2018-09-08 23:47:53 +02:00
parent 718e954df4
commit 3b92f547f5
9 changed files with 5 additions and 35 deletions

View File

@@ -134,7 +134,7 @@ template<typename SparseMatrixType>
bool loadMarket(SparseMatrixType& mat, const std::string& filename)
{
typedef typename SparseMatrixType::Scalar Scalar;
typedef typename SparseMatrixType::Index Index;
typedef typename SparseMatrixType::StorageIndex StorageIndex;
std::ifstream input(filename.c_str(),std::ios::in);
if(!input)
return false;
@@ -144,11 +144,11 @@ bool loadMarket(SparseMatrixType& mat, const std::string& filename)
bool readsizes = false;
typedef Triplet<Scalar,Index> T;
typedef Triplet<Scalar,StorageIndex> T;
std::vector<T> elements;
Index M(-1), N(-1), NNZ(-1);
Index count = 0;
StorageIndex M(-1), N(-1), NNZ(-1);
StorageIndex count = 0;
while(input.getline(buffer, maxBuffersize))
{
// skip comments
@@ -171,7 +171,7 @@ bool loadMarket(SparseMatrixType& mat, const std::string& filename)
}
else
{
Index i(-1), j(-1);
StorageIndex i(-1), j(-1);
Scalar value;
if( internal::GetMarketLine(line, M, N, i, j, value) )
{