Skip to content
Snippets Groups Projects
Commit 1f3e6464 authored by Timo Koch's avatar Timo Koch
Browse files

[foreach][cleanup] Only use return values in debug mode (silences warning)

parent b487d083
No related branches found
No related tags found
No related merge requests found
......@@ -167,8 +167,12 @@ std::pair<std::size_t,std::size_t> flatMatrixForEach(Matrix&& matrix, F&& f, std
{
auto&& entry = *colIt;
auto colIdx = colIt.index();
auto [ dummyRows, dummyCols ] = flatMatrixForEach(entry, f, rowOffset + rowIdx*blockRows, colOffset + colIdx*blockCols);
assert( dummyRows == blockRows and dummyCols == blockCols and "we need the same size of each block in this matrix type");
#ifndef NDEBUG
// only instantiate return value in debug mode (for the assert)
auto [ numRows, numCols ] =
#endif
flatMatrixForEach(entry, f, rowOffset + rowIdx*blockRows, colOffset + colIdx*blockCols);
assert( numRows == blockRows and numCols == blockCols and "we need the same size of each block in this matrix type");
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment