Codechange: [Network] Use new/delete instead of calloc/free for NetworkGameList

This commit is contained in:
rubidium42
2021-05-04 19:30:25 +02:00
committed by rubidium42
parent dc05917287
commit dcef3209a6
3 changed files with 15 additions and 15 deletions

View File

@@ -16,12 +16,17 @@
/** Structure with information shown in the game list (GUI) */
struct NetworkGameList {
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
NetworkGameList(const std::string &connection_string, bool manually = false) :
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; ///< 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 */