Make wxWebResponse::Init() and Finalize() non-public

The former can be called from the derived class ctors while the latter
only needs to be called from wxWebRequest itself, so just make it a
friend: this is not ideal, but still better than leaving this public and
simpler than any alternatives.
This commit is contained in:
Vadim Zeitlin
2020-12-13 01:33:01 +01:00
parent 1c61fe6baf
commit 8ea4f38689
5 changed files with 21 additions and 11 deletions

View File

@@ -63,6 +63,8 @@ wxWebResponseCURL::wxWebResponseCURL(wxWebRequest& request) :
{
curl_easy_setopt(GetHandle(), CURLOPT_WRITEDATA, static_cast<void*>(this));
curl_easy_setopt(GetHandle(), CURLOPT_HEADERDATA, static_cast<void*>(this));
Init();
}
size_t wxWebResponseCURL::WriteData(void* buffer, size_t size)
@@ -192,7 +194,6 @@ void wxWebRequestCURL::Start()
return;
m_response.reset(new wxWebResponseCURL(*this));
m_response->Init();
if ( m_dataSize )
{