diff --git a/include/wx/webrequest_curl.h b/include/wx/webrequest_curl.h index 2033b65d10..aa6b1c7c7d 100644 --- a/include/wx/webrequest_curl.h +++ b/include/wx/webrequest_curl.h @@ -137,10 +137,6 @@ private: static int ms_activeSessions; - static void InitializeCURL(); - - static void CleanupCURL(); - wxDECLARE_NO_COPY_CLASS(wxWebSessionCURL); }; diff --git a/src/common/webrequest_curl.cpp b/src/common/webrequest_curl.cpp index e3f01b60be..cf0e67a999 100644 --- a/src/common/webrequest_curl.cpp +++ b/src/common/webrequest_curl.cpp @@ -346,7 +346,10 @@ wxWebSessionCURL::wxWebSessionCURL() : { // Initialize CURL globally if no sessions are active if ( ms_activeSessions == 0 ) - InitializeCURL(); + { + if ( curl_global_init(CURL_GLOBAL_ALL) ) + wxLogError("libcurl could not be initialized"); + } ms_activeSessions++; } @@ -370,7 +373,7 @@ wxWebSessionCURL::~wxWebSessionCURL() // Global CURL cleanup if this is the last session --ms_activeSessions; if ( ms_activeSessions == 0 ) - CleanupCURL(); + curl_global_cleanup(); } void wxWebSessionCURL::Initialize() @@ -534,18 +537,4 @@ wxVersionInfo wxWebSessionCURL::GetLibraryVersionInfo() desc); } -// static -void wxWebSessionCURL::InitializeCURL() -{ - if ( curl_global_init(CURL_GLOBAL_ALL) ) - wxLogError("libcurl could not be initialized"); -} - -// static -void wxWebSessionCURL::CleanupCURL() -{ - if ( ms_activeSessions == 0 ) - curl_global_cleanup(); -} - #endif // wxUSE_WEBREQUEST_CURL