* replace postfix ++ by prefix ++ wherever that makes sense in Eigen/

* fix some "unused variable" warnings in the tests; there remains a libstdc++ "deprecated"
warning which I haven't looked much into
This commit is contained in:
Benoit Jacob
2008-12-17 14:30:01 +00:00
parent 2110cca431
commit 89f468671d
28 changed files with 164 additions and 162 deletions

View File

@@ -163,7 +163,7 @@ class SparseMatrix
}
assert(m_outerIndex[outer+1] == m_data.size());
int id = m_outerIndex[outer+1];
m_outerIndex[outer+1]++;
++m_outerIndex[outer+1];
m_data.append(0, inner);
return m_data.value(id);
@@ -192,7 +192,7 @@ class SparseMatrix
assert(m_outerIndex[outer+1] == m_data.size() && "invalid outer index");
int startId = m_outerIndex[outer];
int id = m_outerIndex[outer+1]-1;
m_outerIndex[outer+1]++;
++m_outerIndex[outer+1];
m_data.resize(id+2);
while ( (id >= startId) && (m_data.index(id) > inner) )
@@ -212,7 +212,7 @@ class SparseMatrix
// find the last filled column
while (i>=0 && m_outerIndex[i]==0)
--i;
i++;
++i;
while (i<=m_outerSize)
{
m_outerIndex[i] = size;
@@ -299,7 +299,7 @@ class SparseMatrix
// FIXME the above copy could be merged with that pass
for (int j=0; j<otherCopy.outerSize(); ++j)
for (typename _OtherCopy::InnerIterator it(otherCopy, j); it; ++it)
m_outerIndex[it.index()]++;
++m_outerIndex[it.index()];
// prefix sum
int count = 0;