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
1 merge request!544[foreach][cleanup] Only use return values in debug mode (silences warning)
Pipeline #65155 passed
...@@ -167,8 +167,12 @@ std::pair<std::size_t,std::size_t> flatMatrixForEach(Matrix&& matrix, F&& f, std ...@@ -167,8 +167,12 @@ std::pair<std::size_t,std::size_t> flatMatrixForEach(Matrix&& matrix, F&& f, std
{ {
auto&& entry = *colIt; auto&& entry = *colIt;
auto colIdx = colIt.index(); auto colIdx = colIt.index();
auto [ dummyRows, dummyCols ] = flatMatrixForEach(entry, f, rowOffset + rowIdx*blockRows, colOffset + colIdx*blockCols); #ifndef NDEBUG
assert( dummyRows == blockRows and dummyCols == blockCols and "we need the same size of each block in this matrix type"); // 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