Small code cleanups.

This commit is contained in:
Jonathan Naylor 2019-04-02 07:53:36 +01:00
parent 1e9fe90f90
commit 95b9bd50bd
3 changed files with 9 additions and 9 deletions

View file

@ -39,7 +39,7 @@ CCallsignList* CDCSHandler::m_blackList = NULL;
CDCSHandler::CDCSHandler(IReflectorCallback* handler, const wxString& reflector, const wxString& repeater, CDCSProtocolHandler* protoHandler, const in_addr& address, unsigned int port, DIRECTION direction) :
m_reflector(reflector.Clone()),
m_xlxReflector(_T("")),
m_xlxReflector(),
m_isXlx(false),
m_repeater(repeater.Clone()),
m_handler(protoHandler),
@ -80,10 +80,10 @@ m_rptCall2()
m_linkState = DCS_LINKED;
} else {
m_linkState = DCS_LINKING;
m_isXlx = m_reflector.StartsWith(_T("XLX"));
if(m_isXlx) {
m_isXlx = m_reflector.StartsWith(wxT("XLX"));
if (m_isXlx) {
m_xlxReflector = m_reflector.Clone();
m_reflector = _T("DCS") + m_reflector.Right(m_reflector.length() - 3);
m_reflector = wxT("DCS") + m_reflector.Right(m_reflector.length() - 3);
}
m_tryTimer.start();
}

View file

@ -266,7 +266,7 @@ const bool DEFAULT_DCS_ENABLED = true;
const bool DEFAULT_CCS_ENABLED = true;
const wxString DEFAULT_CCS_HOST = wxT("CCS704 ");
const bool DEFAULT_XLX_ENABLED = true;
const wxString DEFAULT_XLX_HOSTS_FILE_URL = _T("http://xlxapi.rlx.lu/api.php?do=GetXLXDMRMaster");//we use the XLXDMRMaster list because it starts with XLX instead of DCS, XRF etc ....
const wxString DEFAULT_XLX_HOSTS_FILE_URL = wxT("http://xlxapi.rlx.lu/api.php?do=GetXLXDMRMaster");//we use the XLXDMRMaster list because it starts with XLX instead of DCS, XRF etc ....
const wxString DEFAULT_STARNET_BAND = wxEmptyString;
const wxString DEFAULT_STARNET_CALLSIGN = wxEmptyString;
const wxString DEFAULT_STARNET_LOGOFF = wxEmptyString;

View file

@ -1117,7 +1117,7 @@ void CIRCDDBGatewayThread::loadGateways()
void CIRCDDBGatewayThread::loadReflectors()
{
if(m_xlxEnabled)
if (m_xlxEnabled)
loadXLXReflectors();
if (m_dplusEnabled) {
@ -1263,7 +1263,7 @@ void CIRCDDBGatewayThread::loadXLXReflectors()
for (unsigned int i = 0U; i < hostFile.getCount(); i++) {
wxString reflector = hostFile.getName(i);
if(!reflector.StartsWith(_T("XLX")))
if (!reflector.StartsWith(wxT("XLX")))
continue;
in_addr address = CUDPReaderWriter::lookup(hostFile.getAddress(i));
@ -1282,9 +1282,9 @@ void CIRCDDBGatewayThread::loadXLXReflectors()
reflector.Truncate(LONG_CALLSIGN_LENGTH - 1U);
reflector.Append(wxT("G"));
//if(m_dcsEnabled && reflector.StartsWith(wxT("DCS")))
//if (m_dcsEnabled && reflector.StartsWith(wxT("DCS")))
m_cache.updateGateway(reflector, addrText, DP_DCS, lock, true);
//else if(m_dextraEnabled && reflector.StartsWith(wxT("XRF")))
//else if (m_dextraEnabled && reflector.StartsWith(wxT("XRF")))
// m_cache.updateGateway(reflector, addrText, DP_DEXTRA, lock, true);
count++;