const game g;
const game_options options = g.get_game_options();
The problem is that game::get_game_options is a pleonasm; i.e. it says the same thing twice. This is un-English and needlessly verbose.
Better would be to be able to write:
const game g;
const game_options options = g.get_options();
There is a test for this:
//#define FIX_ISSUE_472
#ifdef FIX_ISSUE_472
{
const game g;
// Only check if this compiles, we do not care about the RNG seed
assert(g.get_options().get_rng_seed() == 0
|| g.get_options().get_rng_seed() != 0);
}
#endif
Make the test work.
This is very simple if you know this trick: do right-mouse button, click on 'Refactor' and then 'Rename symbol under cursor'. This will allow you to also fix the other calls to game::get_game_options:
Of course, if some calls to get_game_options remain (including in tests), fix these.
Currently, one can write:
The problem is that
game::get_game_options
is a pleonasm; i.e. it says the same thing twice. This is un-English and needlessly verbose.Better would be to be able to write:
There is a test for this:
Make the test work.
This is very simple if you know this trick: do right-mouse button, click on 'Refactor' and then 'Rename symbol under cursor'. This will allow you to also fix the other calls to
game::get_game_options
:Of course, if some calls to
get_game_options
remain (including in tests), fix these.