diff options
author | Loïc Blot <nerzhul@users.noreply.github.com> | 2017-06-17 19:11:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-17 19:11:28 +0200 |
commit | 8f7785771b9e02b1a1daf7a252550d78ea93053d (patch) | |
tree | 7a4e4b524dbc63fed3dac99a3844b634cc621d0d /src/guiMainMenu.h | |
parent | 76be103a91d6987527af19e87d93007be8ba8a67 (diff) | |
download | minetest-8f7785771b9e02b1a1daf7a252550d78ea93053d.tar.gz minetest-8f7785771b9e02b1a1daf7a252550d78ea93053d.tar.bz2 minetest-8f7785771b9e02b1a1daf7a252550d78ea93053d.zip |
Cpp11 initializers 2 (#5999)
* C++11 patchset 10: continue cleanup on constructors
* Drop obsolete bool MainMenuData::enable_public (setting is called with cURL in server loop)
* More classes cleanup
* More classes cleanup + change NULL tests to boolean tests
Diffstat (limited to 'src/guiMainMenu.h')
-rw-r--r-- | src/guiMainMenu.h | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/src/guiMainMenu.h b/src/guiMainMenu.h index 711ad10f8..c1c3c88a9 100644 --- a/src/guiMainMenu.h +++ b/src/guiMainMenu.h @@ -27,14 +27,11 @@ with this program; if not, write to the Free Software Foundation, Inc., struct MainMenuDataForScript { - MainMenuDataForScript() : - reconnect_requested(false) - {} + MainMenuDataForScript() {} // Whether the server has requested a reconnect - bool reconnect_requested; - - std::string errormessage; + bool reconnect_requested = false; + std::string errormessage = ""; }; struct MainMenuData { @@ -46,22 +43,16 @@ struct MainMenuData { std::string name; std::string password; // Whether to reconnect - bool do_reconnect; + bool do_reconnect = false; // Server options - bool enable_public; - int selected_world; - bool simple_singleplayer_mode; + int selected_world = 0; + bool simple_singleplayer_mode = false; // Data to be passed to the script MainMenuDataForScript script_data; - MainMenuData(): - do_reconnect(false), - enable_public(false), - selected_world(0), - simple_singleplayer_mode(false) - {} + MainMenuData() {} }; #endif |