From 36666a975ffd56386e1e66c1b36b7abe988a8b60 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 16 May 2014 13:00:32 +0000 Subject: [PATCH] Add default argument for the overridden base class Connect() in wxHTTP. This allows to call Connect(wxIPV4address) on a wxHTTP object, without having to explicitly specify the second argument (this was documented as being a Watcom-specific problem, but actually it wasn't). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76545 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/protocol/http.h | 2 +- src/common/url.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/wx/protocol/http.h b/include/wx/protocol/http.h index 6bf36d396c..1d4f375a54 100644 --- a/include/wx/protocol/http.h +++ b/include/wx/protocol/http.h @@ -26,7 +26,7 @@ public: virtual bool Connect(const wxString& host, unsigned short port); virtual bool Connect(const wxString& host) wxOVERRIDE { return Connect(host, 0); } - virtual bool Connect(const wxSockAddress& addr, bool wait) wxOVERRIDE; + virtual bool Connect(const wxSockAddress& addr, bool wait = true) wxOVERRIDE; bool Abort() wxOVERRIDE; wxInputStream *GetInputStream(const wxString& path) wxOVERRIDE; diff --git a/src/common/url.cpp b/src/common/url.cpp index 4a634d7118..a914001dc8 100644 --- a/src/common/url.cpp +++ b/src/common/url.cpp @@ -318,7 +318,7 @@ wxInputStream *wxURL::GetInputStream() addr.Service(m_port); - if (!m_protocol->Connect(addr, true)) // Watcom needs the 2nd arg for some reason + if (!m_protocol->Connect(addr)) { m_error = wxURL_CONNERR; return NULL; @@ -388,7 +388,7 @@ void wxURL::SetDefaultProxy(const wxString& url_proxy) ms_proxyDefault->Close(); else ms_proxyDefault = new wxHTTP(); - ms_proxyDefault->Connect(addr, true); // Watcom needs the 2nd arg for some reason + ms_proxyDefault->Connect(addr); } } @@ -427,7 +427,7 @@ void wxURL::SetProxy(const wxString& url_proxy) if (m_proxy && m_proxy != ms_proxyDefault) delete m_proxy; m_proxy = new wxHTTP(); - m_proxy->Connect(addr, true); // Watcom needs the 2nd arg for some reason + m_proxy->Connect(addr); CleanData(); // Reparse url.