1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-17 20:13:07 +01:00

Rename Http namespace, add default initialisers.

This commit is contained in:
Aaron van Geffen
2018-06-11 11:18:41 +02:00
parent 62c25d88fb
commit f1d4e5b596
6 changed files with 49 additions and 47 deletions

View File

@@ -33,15 +33,15 @@
#define OPENRCT2_USER_AGENT "OpenRCT2/" OPENRCT2_VERSION
namespace http
namespace OpenRCT2::Network::Http
{
HTTP::HTTP()
Http::Http()
{
curl_global_init(CURL_GLOBAL_DEFAULT);
}
HTTP::~HTTP()
Http::~Http()
{
curl_global_cleanup();
}
@@ -178,7 +178,7 @@ void DoAsync(const Request & req, std::function<void(Response & res)> fn)
Response res;
try
{
res = http::Do(req);
res = Do(req);
}
catch (std::exception & e)
{
@@ -190,7 +190,7 @@ void DoAsync(const Request & req, std::function<void(Response & res)> fn)
thread.detach();
}
size_t download_park(const char * url, void ** outData)
size_t DownloadPark(const char * url, void ** outData)
{
// Download park to buffer in memory
Request request;
@@ -225,6 +225,6 @@ size_t download_park(const char * url, void ** outData)
return dataSize;
}
} // namespace http
} // namespace OpenRCT2::Network
#endif