Skip to content

Instantly share code, notes, and snippets.

@rubidium42
Last active May 6, 2021 17:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rubidium42/28782c5240cb4701a178c684ac980596 to your computer and use it in GitHub Desktop.
Save rubidium42/28782c5240cb4701a178c684ac980596 to your computer and use it in GitHub Desktop.
Gamelist default-member-initializers
diff --git a/src/network/network_gamelist.h b/src/network/network_gamelist.h
index 38d6c3997..51127b84b 100644
--- a/src/network/network_gamelist.h
+++ b/src/network/network_gamelist.h
@@ -17,16 +17,16 @@
/** Structure with information shown in the game list (GUI) */
struct NetworkGameList {
NetworkGameList(const std::string &connection_string, bool manually = false) :
- info(), connection_string(connection_string), online(false), manually(manually), retries(0), next(nullptr)
+ info(), connection_string(connection_string), manually(manually)
{
}
- NetworkGameInfo info; ///< The game information of this server
- std::string connection_string; ///< Address of the server
- bool online; ///< False if the server did not respond (default status)
- bool manually; ///< True if the server was added manually
- uint8 retries; ///< Number of retries (to stop requerying)
- NetworkGameList *next; ///< Next pointer to make a linked game list
+ NetworkGameInfo info; ///< The game information of this server
+ std::string connection_string; ///< Address of the server
+ bool online = false; ///< False if the server did not respond (default status)
+ bool manually = false; ///< True if the server was added manually
+ uint8 retries = 0; ///< Number of retries (to stop requerying)
+ NetworkGameList *next = nullptr; ///< Next pointer to make a linked game list
};
/** Game list of this client */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment