1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-28 14:44:28 +01:00

Codechange: Remove ZeroedMemoryAllocator from network socket handlers. (#13377)

Prefer member default initialisation instead.
This commit is contained in:
Peter Nelson
2025-01-28 19:10:00 +00:00
committed by GitHub
parent 4099acb946
commit 77f4d776c4
14 changed files with 43 additions and 60 deletions

View File

@@ -38,9 +38,9 @@ static uint16_t _network_udp_broadcast; ///< Timeout for the UDP broadcasts.
/** Some information about a socket, which exists before the actual socket has been created to provide locking and the likes. */
struct UDPSocket {
const std::string name; ///< The name of the socket.
NetworkUDPSocketHandler *socket; ///< The actual socket, which may be nullptr when not initialized yet.
NetworkUDPSocketHandler *socket = nullptr; ///< The actual socket, which may be nullptr when not initialized yet.
UDPSocket(const std::string &name) : name(name), socket(nullptr) {}
UDPSocket(const std::string &name) : name(name) {}
void CloseSocket()
{