Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Vultraz committed Oct 8, 2020
1 parent 9376cf4 commit 8e7e242
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
3 changes: 1 addition & 2 deletions src/game_initialization/multiplayer.cpp
Expand Up @@ -502,9 +502,8 @@ void enter_create_mode(mp_workflow_helper_ptr helper)
bool dlg_ok = false;
{
bool local_mode = helper->connection == nullptr;
mp::user_info* host_info = helper->lobby_info->get_user(preferences::login());

gui2::dialogs::mp_create_game dlg(helper->game_config, helper->state, local_mode, host_info);
gui2::dialogs::mp_create_game dlg(helper->game_config, helper->state, local_mode);
dlg.show();

// The Create Game dialog also has a LOAD_GAME retval besides OK.
Expand Down
3 changes: 1 addition & 2 deletions src/gui/dialogs/multiplayer/mp_create_game.cpp
Expand Up @@ -68,7 +68,7 @@ namespace prefs = preferences;

REGISTER_DIALOG(mp_create_game)

mp_create_game::mp_create_game(const game_config_view& cfg, saved_game& state, bool local_mode, mp::user_info* host_info)
mp_create_game::mp_create_game(const game_config_view& cfg, saved_game& state, bool local_mode)
: cfg_(cfg)
, create_engine_(state)
, config_engine_()
Expand Down Expand Up @@ -97,7 +97,6 @@ mp_create_game::mp_create_game(const game_config_view& cfg, saved_game& state, b
, mod_list_()
, eras_menu_button_()
, local_mode_(local_mode)
, host_info_(host_info)
{
level_types_ = {
{ng::level::TYPE::SCENARIO, _("Scenarios")},
Expand Down
9 changes: 1 addition & 8 deletions src/gui/dialogs/multiplayer/mp_create_game.hpp
Expand Up @@ -26,11 +26,6 @@
class config;
class game_config_view;

namespace mp
{
struct user_info;
}

namespace gui2
{
class toggle_button;
Expand All @@ -45,7 +40,7 @@ class mp_create_game : public modal_dialog, private plugin_executor
typedef std::pair<ng::level::TYPE, std::string> level_type_info;

public:
mp_create_game(const game_config_view& cfg, saved_game& state, bool local_mode, mp::user_info* host_info = nullptr);
mp_create_game(const game_config_view& cfg, saved_game& state, bool local_mode);

private:
/** Inherited from modal_dialog, implemented by REGISTER_DIALOG. */
Expand Down Expand Up @@ -118,8 +113,6 @@ class mp_create_game : public modal_dialog, private plugin_executor

bool local_mode_;

mp::user_info* host_info_;

template<typename widget>
void on_filter_change(window& window, const std::string& id, bool do_select);

Expand Down

0 comments on commit 8e7e242

Please sign in to comment.