1
0
Fork 0

Remove stale reflector entries from the list.

ycs232-kbc
Jonathan Naylor 8 years ago committed by GitHub
parent 92a401ba0a
commit a3944b5b98

@ -40,6 +40,8 @@ CReflectors::~CReflectors()
{ {
for (std::vector<CYSFReflector*>::iterator it = m_reflectors.begin(); it != m_reflectors.end(); ++it) for (std::vector<CYSFReflector*>::iterator it = m_reflectors.begin(); it != m_reflectors.end(); ++it)
delete *it; delete *it;
m_reflectors.clear();
} }
static bool refComparison(const CYSFReflector* r1, const CYSFReflector* r2) static bool refComparison(const CYSFReflector* r1, const CYSFReflector* r2)
@ -71,6 +73,8 @@ bool CReflectors::load()
for (std::vector<CYSFReflector*>::iterator it = m_reflectors.begin(); it != m_reflectors.end(); ++it) for (std::vector<CYSFReflector*>::iterator it = m_reflectors.begin(); it != m_reflectors.end(); ++it)
delete *it; delete *it;
m_reflectors.clear();
char buffer[100U]; char buffer[100U];
while (::fgets(buffer, 100U, fp) != NULL) { while (::fgets(buffer, 100U, fp) != NULL) {
if (buffer[0U] == '#') if (buffer[0U] == '#')

Loading…
Cancel
Save