// -*- c++ -*- ///////////////////////////////////////////////////////////////
-// Name: unix/net.cpp
+// Name: src/unix/net.cpp
// Purpose: Network related wxWindows classes and functions
// Author: Karsten Ballüder
// Modified by:
bool rc = m_timer->Start(nSeconds*1000);
if(! rc)
{
- delete m_timer;
- m_timer = NULL;
+ wxDELETE(m_timer);
}
return rc;
}
{
wxASSERT(m_timer != NULL);
m_timer->Stop();
- delete m_timer;
- m_timer = NULL;
+ wxDELETE(m_timer);
}
{
/// does hostname contain a port number?
wxString port = hostname.After(':');
- if(port.Length())
+ if(port.empty())
{
- m_BeaconHost = hostname.Before(':');
- m_BeaconPort = atoi(port);
+ m_BeaconHost = hostname;
+ m_BeaconPort = portno;
}
else
{
- m_BeaconHost = hostname;
- m_BeaconPort = portno;
+ m_BeaconHost = hostname.Before(':');
+ m_BeaconPort = atoi(port);
}
}
// Let's try the ifconfig method first, should be fastest:
if(m_CanUseIfconfig != 0) // unknown or yes
{
- wxASSERT(m_IfconfigPath.length());
+ wxASSERT( !m_IfconfigPath.empty() );
wxString tmpfile = wxFileName::CreateTempFileName("_wxdialuptest");
wxString cmd = "/bin/sh -c \'";