diff options
author | rubidium <rubidium@openttd.org> | 2011-11-12 13:00:29 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2011-11-12 13:00:29 +0000 |
commit | 7fd1e1df81c3ed45e176f1bbf46d873b6cff316e (patch) | |
tree | 8f2ad83400a7897a066ff4f500bd0cdd150c1b93 /src/network | |
parent | d61b90ac6fb63ee42f47ca53cacd5aa7d7b30bae (diff) | |
download | openttd-7fd1e1df81c3ed45e176f1bbf46d873b6cff316e.tar.xz |
(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
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/core/tcp_http.cpp | 2 | ||||
-rw-r--r-- | src/network/core/tcp_http.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/network/core/tcp_http.cpp b/src/network/core/tcp_http.cpp index 0bf733462..386ba776c 100644 --- a/src/network/core/tcp_http.cpp +++ b/src/network/core/tcp_http.cpp @@ -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) diff --git a/src/network/core/tcp_http.h b/src/network/core/tcp_http.h index 1af7c31df..dc678cca0 100644 --- a/src/network/core/tcp_http.h +++ b/src/network/core/tcp_http.h @@ -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) |