From a06520833420ca1939fae50cdd86ec56d8e0fdeb Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Tue, 5 Jan 2021 19:28:48 +1100 Subject: [PATCH] Removed load_game_metadata ctor (used aggregate init) --- src/savegame.cpp | 5 +++-- src/savegame.hpp | 16 +++------------- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/src/savegame.cpp b/src/savegame.cpp index b51e3ccd0ed..ce14087e681 100644 --- a/src/savegame.cpp +++ b/src/savegame.cpp @@ -84,8 +84,9 @@ void clean_saves(const std::string& label) loadgame::loadgame(const std::shared_ptr& 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() { diff --git a/src/savegame.hpp b/src/savegame.hpp index 37512f57913..b95f65eb0de 100644 --- a/src/savegame.hpp +++ b/src/savegame.hpp @@ -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 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) - { - } }; /**