Removed load_game_metadata ctor (used aggregate init)

This commit is contained in:
Charles Dang 2021-01-05 19:28:48 +11:00
parent 0697f31cd3
commit a065208334
2 changed files with 6 additions and 15 deletions

View File

@ -84,8 +84,9 @@ void clean_saves(const std::string& label)
loadgame::loadgame(const std::shared_ptr<save_index_class>& index, const game_config_view& game_config, saved_game& gamestate)
: game_config_(game_config)
, gamestate_(gamestate)
, load_data_(index)
{}
, load_data_{index}
{
}
bool loadgame::show_difficulty_dialog()
{

View File

@ -61,29 +61,19 @@ struct load_game_metadata
std::string difficulty;
/** State of the "show_replay" checkbox in the load-game dialog. */
bool show_replay;
bool show_replay = false;
/** State of the "cancel_orders" checkbox in the load-game dialog. */
bool cancel_orders;
bool cancel_orders = false;
/** State of the "change_difficulty" checkbox in the load-game dialog. */
bool select_difficulty;
bool select_difficulty = false;
/** Summary config of the save selected in the load game dialog. */
config summary;
/** Config information of the savefile to be loaded. */
config load_config;
explicit load_game_metadata(std::shared_ptr<save_index_class> index,
const std::string& fname = "", const std::string& hard = "",
bool replay = false, bool stop = false, bool change = false,
const config& summary = config(), const config& info = config())
: manager(index), filename(fname), difficulty(hard)
, show_replay(replay), cancel_orders(stop), select_difficulty(change)
, summary(summary), load_config(info)
{
}
};
/**