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

(svn r23198) -Codechange: introduce a free that takes const pointers so we don't need to cast to void/non-const before being able to free

This commit is contained in:
rubidium
2011-11-12 13:00:29 +00:00
parent d61b90ac6f
commit 7fd1e1df81
21 changed files with 78 additions and 60 deletions

View File

@@ -73,7 +73,7 @@ NetworkHTTPSocketHandler::~NetworkHTTPSocketHandler()
if (this->sock != INVALID_SOCKET) closesocket(this->sock);
this->sock = INVALID_SOCKET;
free((void*)this->data);
free(this->data);
}
NetworkRecvStatus NetworkHTTPSocketHandler::CloseConnection(bool error)

View File

@@ -105,13 +105,13 @@ public:
/** Free all our allocated data. */
~NetworkHTTPContentConnecter()
{
free((void*)this->url);
free(this->url);
}
virtual void OnFailure()
{
this->callback->OnFailure();
free((void*)this->data);
free(this->data);
}
virtual void OnConnect(SOCKET s)