From ddc7f0c97571b231f231b5abaa9f4e4eaf1e46a9 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 20 Oct 2008 08:59:45 +0000 Subject: [PATCH] fix virtual function hiding warnings introduced to changing wxSockAddress argument of Connect() to be passed by const reference git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56460 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/protocol/ftp.h | 2 +- include/wx/protocol/http.h | 2 +- include/wx/protocol/protocol.h | 3 ++- src/common/ftp.cpp | 2 +- src/common/http.cpp | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/include/wx/protocol/ftp.h b/include/wx/protocol/ftp.h index 01336376e0..21312e87fd 100644 --- a/include/wx/protocol/ftp.h +++ b/include/wx/protocol/ftp.h @@ -38,7 +38,7 @@ public: void SetUser(const wxString& user) { m_user = user; } void SetPassword(const wxString& passwd) { m_passwd = passwd; } - bool Connect(wxSockAddress& addr, bool wait = true); + bool Connect(const wxSockAddress& addr, bool wait = true); bool Connect(const wxString& host); // disconnect diff --git a/include/wx/protocol/http.h b/include/wx/protocol/http.h index 79f37c7924..29f727451f 100644 --- a/include/wx/protocol/http.h +++ b/include/wx/protocol/http.h @@ -29,7 +29,7 @@ public: virtual bool Connect(const wxString& host, unsigned short port); virtual bool Connect(const wxString& host) { return Connect(host, 0); } - virtual bool Connect(wxSockAddress& addr, bool wait); + virtual bool Connect(const wxSockAddress& addr, bool wait); bool Abort(); wxInputStream *GetInputStream(const wxString& path); inline wxProtocolError GetError() { return m_perr; } diff --git a/include/wx/protocol/protocol.h b/include/wx/protocol/protocol.h index a6012c5c9e..bdf1b5760d 100644 --- a/include/wx/protocol/protocol.h +++ b/include/wx/protocol/protocol.h @@ -59,7 +59,8 @@ public: #if wxUSE_SOCKETS bool Reconnect(); virtual bool Connect( const wxString& WXUNUSED(host) ) { return FALSE; } - virtual bool Connect( wxSockAddress& addr, bool WXUNUSED(wait) = TRUE) { return wxSocketClient::Connect(addr); } + virtual bool Connect( const wxSockAddress& addr, bool WXUNUSED(wait) = TRUE) + { return wxSocketClient::Connect(addr); } // read a '\r\n' terminated line from the given socket and put it in // result (without the terminators) diff --git a/src/common/ftp.cpp b/src/common/ftp.cpp index 27b3e70cdf..909fe66861 100644 --- a/src/common/ftp.cpp +++ b/src/common/ftp.cpp @@ -107,7 +107,7 @@ wxFTP::~wxFTP() // wxFTP connect and login methods // ---------------------------------------------------------------------------- -bool wxFTP::Connect(wxSockAddress& addr, bool WXUNUSED(wait)) +bool wxFTP::Connect(const wxSockAddress& addr, bool WXUNUSED(wait)) { if ( !wxProtocol::Connect(addr) ) { diff --git a/src/common/http.cpp b/src/common/http.cpp index fc7248f61a..4525c98107 100644 --- a/src/common/http.cpp +++ b/src/common/http.cpp @@ -219,7 +219,7 @@ bool wxHTTP::Connect(const wxString& host, unsigned short port) return true; } -bool wxHTTP::Connect(wxSockAddress& addr, bool WXUNUSED(wait)) +bool wxHTTP::Connect(const wxSockAddress& addr, bool WXUNUSED(wait)) { if (m_addr) { delete m_addr; -- 2.45.2