1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-09-02 19:39:12 +00:00

Codechange: use default dtor instead of empty (#10826)

This commit is contained in:
Patric Stout
2023-05-14 23:31:03 +02:00
committed by GitHub
parent 7634553d22
commit 199e41c762
35 changed files with 40 additions and 62 deletions

View File

@@ -48,7 +48,7 @@ public:
NetworkSocketHandler() { this->has_quit = false; }
/** Close the socket when destructing the socket handler */
virtual ~NetworkSocketHandler() {}
virtual ~NetworkSocketHandler() = default;
/**
* Mark the connection as closed.

View File

@@ -42,7 +42,7 @@ struct HTTPCallback {
virtual bool IsCancelled() const = 0;
/** Silentium */
virtual ~HTTPCallback() {}
virtual ~HTTPCallback() = default;
};
/** Base socket handler for HTTP traffic. */

View File

@@ -518,7 +518,7 @@ public:
* @param status The reason the connection got closed.
*/
virtual NetworkRecvStatus CloseConnection(NetworkRecvStatus status) = 0;
virtual ~NetworkGameSocketHandler() {}
virtual ~NetworkGameSocketHandler() = default;
/**
* Sets the client info for this socket handler.

View File

@@ -57,7 +57,7 @@ struct ContentCallback {
virtual void OnDownloadComplete(ContentID cid) {}
/** Silentium */
virtual ~ContentCallback() {}
virtual ~ContentCallback() = default;
};
/**

View File

@@ -1444,7 +1444,7 @@ public:
this->height = d.height + WidgetDimensions::scaled.framerect.Vertical();
this->width = d.width + WidgetDimensions::scaled.framerect.Horizontal();
}
virtual ~ButtonCommon() {}
virtual ~ButtonCommon() = default;
/**
* OnClick handler for when the button is pressed.

View File

@@ -70,7 +70,7 @@ public:
* @param addresses The addresses to bind on.
*/
ServerNetworkUDPSocketHandler(NetworkAddressList *addresses) : NetworkUDPSocketHandler(addresses) {}
virtual ~ServerNetworkUDPSocketHandler() {}
virtual ~ServerNetworkUDPSocketHandler() = default;
};
void ServerNetworkUDPSocketHandler::Receive_CLIENT_FIND_SERVER(Packet *p, NetworkAddress *client_addr)
@@ -88,7 +88,7 @@ class ClientNetworkUDPSocketHandler : public NetworkUDPSocketHandler {
protected:
void Receive_SERVER_RESPONSE(Packet *p, NetworkAddress *client_addr) override;
public:
virtual ~ClientNetworkUDPSocketHandler() {}
virtual ~ClientNetworkUDPSocketHandler() = default;
};
void ClientNetworkUDPSocketHandler::Receive_SERVER_RESPONSE(Packet *p, NetworkAddress *client_addr)