From d5a9364eced9ab86a4d6110427bfecf25a41c763 Mon Sep 17 00:00:00 2001 From: hiker Date: Mon, 19 Oct 2015 17:06:14 +1100 Subject: [PATCH] Minor cosmetic changes. --- src/network/protocols/start_server.cpp | 13 +++++++++---- src/network/protocols/start_server.hpp | 12 ++++++++---- src/states_screens/create_server_screen.cpp | 5 +---- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/src/network/protocols/start_server.cpp b/src/network/protocols/start_server.cpp index 620470246..7c739b7b9 100644 --- a/src/network/protocols/start_server.cpp +++ b/src/network/protocols/start_server.cpp @@ -25,17 +25,20 @@ StartServer::StartServer() : Protocol(NULL, PROTOCOL_SILENT) { -} +} // StartServer +// ---------------------------------------------------------------------------- StartServer::~StartServer() { -} +} // ~StartServer +// ---------------------------------------------------------------------------- void StartServer::setup() { m_state = NONE; -} +} // setup +// ---------------------------------------------------------------------------- void StartServer::asynchronousUpdate() { if (m_state == NONE) @@ -83,4 +86,6 @@ void StartServer::asynchronousUpdate() m_request = NULL; m_listener->requestTerminate(this); } -} +} // asynchronousUpdate + +// ---------------------------------------------------------------------------- diff --git a/src/network/protocols/start_server.hpp b/src/network/protocols/start_server.hpp index b375ff8d3..c25a35b2f 100644 --- a/src/network/protocols/start_server.hpp +++ b/src/network/protocols/start_server.hpp @@ -15,11 +15,15 @@ class StartServer : public Protocol StartServer(); virtual ~StartServer(); - virtual bool notifyEvent(Event* event) { return true; } - virtual bool notifyEventAsynchronous(Event* event) { return true; } virtual void setup(); - virtual void update() {} virtual void asynchronousUpdate(); + // -------------------------------------------------------------------- + virtual bool notifyEvent(Event* event) { return true; } + // -------------------------------------------------------------------- + virtual bool notifyEventAsynchronous(Event* event) { return true; } + // -------------------------------------------------------------------- + virtual void update() {} + // -------------------------------------------------------------------- protected: Online::XMLRequest* m_request; @@ -31,6 +35,6 @@ class StartServer : public Protocol EXITING }; STATE m_state; -}; +}; // class StartServer #endif // START_SERVER_HPP diff --git a/src/states_screens/create_server_screen.cpp b/src/states_screens/create_server_screen.cpp index c37bc061b..5c3453c87 100644 --- a/src/states_screens/create_server_screen.cpp +++ b/src/states_screens/create_server_screen.cpp @@ -54,8 +54,6 @@ CreateServerScreen::CreateServerScreen() : Screen("online/create_server.stkgui") void CreateServerScreen::loadedFromFile() { - - m_name_widget = getWidget("name"); assert(m_name_widget != NULL); m_name_widget->setText(_("%s's server", PlayerManager::getCurrentOnlineUserName())); @@ -134,7 +132,7 @@ void CreateServerScreen::serverCreationRequest() const irr::core::stringw name = m_name_widget->getText().trim(); const int max_players = m_max_players_widget->getValue(); Server *server = new Server(name, /*lan*/true, max_players, - /*current_player*/1); + /*current_player*/1); ServersManager::get()->addServer(server); return; } @@ -155,7 +153,6 @@ void CreateServerScreen::serverCreationRequest() } else { - m_server_creation_request = new ServerCreationRequest(); PlayerManager::setUserDetails(m_server_creation_request, "create", Online::API::SERVER_PATH);