1
0
Fork 0

Requested changes

Changed indentation from space to tab, used false instead of 0 for boolean variables.
master
Antonio Matraia 1 year ago
parent 2530199d54
commit 95d83fd9ce

@ -276,7 +276,7 @@ bool CConf::read()
m_ysfNetworkYSF2P25Address = value;
else if (::strcmp(key, "YSF2P25Port") == 0)
m_ysfNetworkYSF2P25Port = (unsigned short)::atoi(value);
else if (::strcmp(key, "YSFDirectAddress") == 0)
else if (::strcmp(key, "YSFDirectAddress") == 0)
m_ysfNetworkYSFDirectAddress = value;
else if (::strcmp(key, "YSFDirectPort") == 0)
m_ysfNetworkYSFDirectPort = (unsigned short)::atoi(value);

@ -378,11 +378,11 @@ WX_STATUS CWiresX::processConnect(const unsigned char* source, const unsigned ch
std::string id = std::string((char*)data, 5U);
CYSFReflector* reflector_tmp;
CYSFReflector* reflector_tmp;
reflector_tmp = m_reflectors.findById(id);
if (reflector_tmp != NULL)
m_reflector = reflector_tmp;
if (reflector_tmp != NULL)
m_reflector = reflector_tmp;
if (m_reflector == NULL)
return WXS_NONE;

@ -283,10 +283,10 @@ int CYSFGateway::run()
unsigned char dt = fich.getDT();
CYSFReflector* reflector = m_wiresX->getReflector();
if (reflector != NULL)
wx_tmp = reflector->m_wiresX;
else
wx_tmp = 0;
if (reflector != NULL)
wx_tmp = reflector->m_wiresX;
else
wx_tmp = false;
if (m_ysfNetwork != NULL && m_linkType == LINK_YSF && wiresXCommandPassthrough && wx_tmp) {
processDTMF(buffer, dt);
processWiresX(buffer, fich, true, wiresXCommandPassthrough);
@ -294,10 +294,10 @@ int CYSFGateway::run()
processDTMF(buffer, dt);
processWiresX(buffer, fich, false, wiresXCommandPassthrough);
reflector = m_wiresX->getReflector(); //reflector may have changed
if (reflector != NULL)
wx_tmp = reflector->m_wiresX;
else
wx_tmp = 0;
if (reflector != NULL)
wx_tmp = reflector->m_wiresX;
else
wx_tmp = false;
if (m_ysfNetwork != NULL && m_linkType == LINK_YSF && wx_tmp)
m_exclude = (dt == YSF_DT_DATA_FR_MODE);
}
@ -840,7 +840,7 @@ void CYSFGateway::startupLinking()
m_linkType = LINK_NONE;
CYSFReflector* reflector = m_reflectors->findByName(m_startup);
if (reflector == NULL)
if (reflector == NULL)
reflector = m_reflectors->findById(m_startup);
if (reflector != NULL) {
LogMessage("Automatic (re-)connection to %5.5s - \"%s\"", reflector->m_id.c_str(), reflector->m_name.c_str());
@ -903,7 +903,7 @@ void CYSFGateway::processRemoteCommands()
std::string id = std::string((char*)(buffer + 7U));
// Left trim
// id.erase(id.begin(), std::find_if(id.begin(), id.end(), std::not1(std::ptr_fun<int, int>(std::isspace))));
id.erase(std::remove_if(id.begin(), id.end(), [](char c) { return !std::isalnum(c); }), id.end());
id.erase(std::remove_if(id.begin(), id.end(), [](char c) { return !std::isalnum(c); }), id.end());
CYSFReflector* reflector = m_reflectors->findById(id);
if (reflector == NULL)
reflector = m_reflectors->findByName(id);
@ -935,7 +935,7 @@ void CYSFGateway::processRemoteCommands()
std::string raw = std::string((char*)(buffer + 7U));
// Left trim
// raw.erase(raw.begin(), std::find_if(raw.begin(), raw.end(), std::not1(std::ptr_fun<int, int>(std::isspace))));
raw.erase(std::remove_if(raw.begin(), raw.end(), [](char c) { return !std::isalnum(c); }), raw.end());
raw.erase(std::remove_if(raw.begin(), raw.end(), [](char c) { return !std::isalnum(c); }), raw.end());
std::string id = "FCS00";
std::string idShort = "FCS";
if (raw.length() == 3U) {

@ -260,7 +260,7 @@ bool CYSFReflectors::load()
}
}
// Add the YSFDirect entry
// Add the YSFDirect entry
if (m_YSFDirectPort > 0U) {
sockaddr_storage addr;
unsigned int addrLen;
@ -283,8 +283,8 @@ bool CYSFReflectors::load()
}
}
unsigned int id = 9U;
for (std::vector<std::pair<std::string, std::string>>::const_iterator it1 = m_fcsRooms.cbegin(); it1 != m_fcsRooms.cend(); ++it1) {
bool used;

Loading…
Cancel
Save