summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-11-12 13:00:29 +0000
committerrubidium <rubidium@openttd.org>2011-11-12 13:00:29 +0000
commit7fd1e1df81c3ed45e176f1bbf46d873b6cff316e (patch)
tree8f2ad83400a7897a066ff4f500bd0cdd150c1b93 /src/network
parentd61b90ac6fb63ee42f47ca53cacd5aa7d7b30bae (diff)
downloadopenttd-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.cpp2
-rw-r--r--src/network/core/tcp_http.h4
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)