fix (harmless) VC7 warnings about auto_ptr assignment
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56922 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -72,26 +72,21 @@ CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( SocketTestCase, "SocketTestCase" );
|
|||||||
|
|
||||||
wxSockAddressPtr SocketTestCase::GetServer() const
|
wxSockAddressPtr SocketTestCase::GetServer() const
|
||||||
{
|
{
|
||||||
wxSockAddressPtr ptr;
|
if ( gs_serverHost.empty() )
|
||||||
if ( !gs_serverHost.empty() )
|
return wxSockAddressPtr();
|
||||||
{
|
|
||||||
wxIPV4address *addr = new wxIPV4address;
|
wxIPV4address *addr = new wxIPV4address;
|
||||||
addr->Hostname(gs_serverHost);
|
addr->Hostname(gs_serverHost);
|
||||||
addr->Service("www");
|
addr->Service("www");
|
||||||
|
|
||||||
ptr = wxSockAddressPtr(addr);
|
return wxSockAddressPtr(addr);
|
||||||
}
|
|
||||||
|
|
||||||
return ptr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wxSocketClientPtr SocketTestCase::GetHTTPSocket(int flags) const
|
wxSocketClientPtr SocketTestCase::GetHTTPSocket(int flags) const
|
||||||
{
|
{
|
||||||
wxSocketClientPtr ptr;
|
|
||||||
|
|
||||||
wxSockAddressPtr addr = GetServer();
|
wxSockAddressPtr addr = GetServer();
|
||||||
if ( !addr.get() )
|
if ( !addr.get() )
|
||||||
return ptr;
|
return wxSocketClientPtr();
|
||||||
|
|
||||||
wxSocketClient *sock = new wxSocketClient(flags);
|
wxSocketClient *sock = new wxSocketClient(flags);
|
||||||
sock->SetTimeout(1);
|
sock->SetTimeout(1);
|
||||||
@@ -104,8 +99,7 @@ wxSocketClientPtr SocketTestCase::GetHTTPSocket(int flags) const
|
|||||||
|
|
||||||
sock->Write(httpGetRoot.ToAscii(), httpGetRoot.length());
|
sock->Write(httpGetRoot.ToAscii(), httpGetRoot.length());
|
||||||
|
|
||||||
ptr = wxSocketClientPtr(sock);
|
return wxSocketClientPtr(sock);
|
||||||
return ptr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SocketTestCase::BlockingConnect()
|
void SocketTestCase::BlockingConnect()
|
||||||
|
Reference in New Issue
Block a user