richelbilderbeek / djog_unos_2018

Project by the Uno's at DJOG 2018-2019: Nature Zen
GNU General Public License v3.0
6 stars 2 forks source link

Simplify 'create_test_default_tiles' by removing explicit call to tile_id constructor #557

Closed richelbilderbeek closed 5 years ago

richelbilderbeek commented 5 years ago

Is your feature request related to a problem? Please describe.

Currently, create_test_default_tiles looks like this:

std::vector<tile> create_test_default_tiles() noexcept //!OCLINT indeed a function that is too long
{
  // ...
    tile t(0, 0, 0, 90, 0, tile_type::grassland, tile_id());
  // ...
}

The explicit call to tile_id can be removed, as it is called by default in the tile constructor.

Describe the solution you'd like

Remove the tile_id() argument in a tile constructor.

For example:

    tile t(0, 0, 0, 90, 0, tile_type::grassland, tile_id());

Becomes:

    tile t(0, 0, 0, 90, 0, tile_type::grassland);

All tests should keep passing.

Describe alternatives you've considered

None.

Additional context

None.