Fix for_each_indexed util function

- Fix typo in util function name for_each_indexed.
- Use the overloaded functions for_each_indexed and for_each_pair
  with a container argument where possible to improve readability.
This commit is contained in:
Michael Bell
2021-10-22 12:00:07 +01:00
parent 2c81083406
commit 04c2167c2d
6 changed files with 8 additions and 23 deletions
@@ -251,7 +251,7 @@ BOOST_AUTO_TEST_CASE(cell_64_bits)
}
levels_to_num_cells[level] = num_cells;
};
util::for_each_indexed(level_cells.cbegin(), level_cells.cend(), set_level_cells);
util::for_each_indexed(level_cells, set_level_cells);
MultiLevelPartition mlp{levels, levels_to_num_cells};
@@ -280,7 +280,7 @@ BOOST_AUTO_TEST_CASE(cell_overflow_bits)
}
levels_to_num_cells[level] = num_cells;
};
util::for_each_indexed(level_cells.cbegin(), level_cells.cend(), set_level_cells);
util::for_each_indexed(level_cells, set_level_cells);
BOOST_REQUIRE_EXCEPTION(MultiLevelPartition(levels, levels_to_num_cells),
util::exception,