Skip to content
Snippets Groups Projects
Commit 659c76d3 authored by Michael Kuron's avatar Michael Kuron :mortar_board:
Browse files

eliminate some warnings about range-based for loops incorrectly using references

parent ad457d81
No related merge requests found
......@@ -98,7 +98,7 @@ void rangeBasedTest()
auto dx = Vector3<real_t>( Grid::iterator::getUnitCellX(spacing), Grid::iterator::getUnitCellY(spacing), Grid::iterator::getUnitCellZ(spacing) );
auto lowerIt = typename Grid::iterator(domain, Vector3<real_t>(5,5,5) - dx * 30, spacing);
auto endIt = typename Grid::iterator();
for ( const auto& pt : Grid(domain, Vector3<real_t>(5,5,5) - dx * 30, spacing) )
for ( const auto pt : Grid(domain, Vector3<real_t>(5,5,5) - dx * 30, spacing) )
{
WALBERLA_CHECK( lowerIt != endIt );
WALBERLA_CHECK_FLOAT_EQUAL( *lowerIt, pt);
......
......@@ -59,7 +59,7 @@ void test( const std::string & filename, const Vector3<uint_t> & size, const std
CellInterval ci( 0, 0, 0, cell_idx_c( size[0] ) - 1, cell_idx_c( size[1] ) - 1, cell_idx_c( size[2] ) - 1 );
for (const Cell & c : ci)
for (const Cell c : ci)
{
field->get( c ) = brf.get( uint_c( c[0] ), uint_c( c[1] ), uint_c( c[2] ) );
}
......@@ -100,7 +100,7 @@ void testScaled( const std::string & filename, const Vector3<uint_t> & size, con
CellInterval ci( 0, 0, 0, cell_idx_c( scaledSize[0] ) - 1, cell_idx_c( scaledSize[1] ) - 1, cell_idx_c( scaledSize[2] ) - 1 );
for (const Cell & c : ci)
for (const Cell c : ci)
{
auto pos = blocks->getBlockLocalCellCenter( block, c );
field->get( c ) = brfi.get( pos );
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment