From 110fdc1157d94f5d787a21c60163681767fdd6c4 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 9 Jan 2024 13:13:23 +0300 Subject: more strict constructor of MHttpRequest to avoid quirks --- protocols/Tox/src/http_request.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'protocols/Tox') diff --git a/protocols/Tox/src/http_request.h b/protocols/Tox/src/http_request.h index 1e140b2ef0..cacc66f51d 100644 --- a/protocols/Tox/src/http_request.h +++ b/protocols/Tox/src/http_request.h @@ -19,28 +19,27 @@ public: class HttpRequest : public MHttpRequest { - void Init(int type) + void Init() { - requestType = type; flags = NLHRF_HTTP11 | NLHRF_SSL | NLHRF_NODUMPSEND | NLHRF_DUMPASTEXT; - nlc = nullptr; - timeout = 0; } protected: enum HttpRequestUrlFormat { FORMAT }; public: - HttpRequest(int type, LPCSTR url) + HttpRequest(int type, LPCSTR url) : + MHttpRequest(type) { - Init(type); + Init(); m_szUrl = url; } - HttpRequest(int type, HttpRequestUrlFormat, LPCSTR urlFormat, ...) + HttpRequest(int type, HttpRequestUrlFormat, LPCSTR urlFormat, ...) : + MHttpRequest(type) { - Init(type); + Init(); va_list formatArgs; va_start(formatArgs, urlFormat); -- cgit v1.2.3