mirror of
https://github.com/oe7drt/YSFClients.git
synced 2026-04-04 22:07:44 +00:00
Remove config opton / code for making hostfiles UPPER case
This commit is contained in:
parent
450fd77a09
commit
9df9a1aa16
6 changed files with 3 additions and 27 deletions
|
|
@ -26,7 +26,7 @@
|
|||
#include <cstring>
|
||||
#include <cctype>
|
||||
|
||||
CYSFReflectors::CYSFReflectors(const std::string& hostsFile, unsigned int reloadTime, bool makeUpper) :
|
||||
CYSFReflectors::CYSFReflectors(const std::string& hostsFile, unsigned int reloadTime) :
|
||||
m_hostsFile(hostsFile),
|
||||
m_parrotAddress(),
|
||||
m_parrotPort(0U),
|
||||
|
|
@ -40,7 +40,6 @@ m_fcsRooms(),
|
|||
m_newReflectors(),
|
||||
m_currReflectors(),
|
||||
m_search(),
|
||||
m_makeUpper(makeUpper),
|
||||
m_timer(1000U, reloadTime * 60U)
|
||||
{
|
||||
if (reloadTime > 0U)
|
||||
|
|
@ -284,13 +283,6 @@ bool CYSFReflectors::load()
|
|||
if (size == 0U)
|
||||
return false;
|
||||
|
||||
if (m_makeUpper) {
|
||||
for (std::vector<CYSFReflector*>::iterator it = m_newReflectors.begin(); it != m_newReflectors.end(); ++it) {
|
||||
std::transform((*it)->m_name.begin(), (*it)->m_name.end(), (*it)->m_name.begin(), ::toupper);
|
||||
std::transform((*it)->m_desc.begin(), (*it)->m_desc.end(), (*it)->m_desc.begin(), ::toupper);
|
||||
}
|
||||
}
|
||||
|
||||
std::sort(m_newReflectors.begin(), m_newReflectors.end(), refComparison);
|
||||
|
||||
return true;
|
||||
|
|
@ -324,9 +316,6 @@ bool CYSFReflectors::findById(unsigned int id) const
|
|||
CYSFReflector* CYSFReflectors::findByName(const std::string& name)
|
||||
{
|
||||
std::string fullName = name;
|
||||
if (m_makeUpper) {
|
||||
std::transform(fullName.begin(), fullName.end(), fullName.begin(), ::toupper);
|
||||
}
|
||||
fullName.resize(16U, ' ');
|
||||
|
||||
for (std::vector<CYSFReflector*>::const_iterator it = m_currReflectors.cbegin(); it != m_currReflectors.cend(); ++it) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue