summaryrefslogtreecommitdiff
path: root/src/network/core/tcp_http.h
diff options
context:
space:
mode:
authorrubidium42 <rubidium@openttd.org>2021-06-13 21:47:32 +0200
committerrubidium42 <rubidium42@users.noreply.github.com>2021-06-15 06:13:00 +0200
commit49dcf0c772606bfd76ffa083a11d77c8e273f919 (patch)
tree429482f6ea05e0cc612a43e885f7e36dbd7cd889 /src/network/core/tcp_http.h
parent53b4786037d8b040991eb7d2146ac11ebd8cb718 (diff)
downloadopenttd-49dcf0c772606bfd76ffa083a11d77c8e273f919.tar.xz
Codechange: [Network] Simplify constructing the HTTP request with fmt
Diffstat (limited to 'src/network/core/tcp_http.h')
-rw-r--r--src/network/core/tcp_http.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/core/tcp_http.h b/src/network/core/tcp_http.h
index da7a04ac4..608d50200 100644
--- a/src/network/core/tcp_http.h
+++ b/src/network/core/tcp_http.h
@@ -61,7 +61,7 @@ public:
void CloseSocket();
NetworkHTTPSocketHandler(SOCKET sock, HTTPCallback *callback,
- const char *host, const char *url, const char *data, int depth);
+ const std::string &host, const char *url, const char *data, int depth);
~NetworkHTTPSocketHandler();
@@ -112,7 +112,7 @@ public:
void OnConnect(SOCKET s) override
{
- new NetworkHTTPSocketHandler(s, this->callback, this->hostname.c_str(), this->url, this->data, this->depth);
+ new NetworkHTTPSocketHandler(s, this->callback, this->hostname, this->url, this->data, this->depth);
/* We've relinquished control of data now. */
this->data = nullptr;
}