fixed eoFileMonitor bug when vector is empty

This commit is contained in:
LPTK 2013-07-17 16:26:47 +02:00
commit 8080d1b345

View file

@ -73,16 +73,18 @@ eoMonitor& eoFileMonitor::operator()(void)
eoMonitor& eoFileMonitor::operator()(std::ostream& os)
{
iterator it = vec.begin();
os << (*it)->getValue();
for(++it; it != vec.end(); ++it)
if (vec.size() > 0)
{
os << delim.c_str() << (*it)->getValue();
iterator it = vec.begin();
os << (*it)->getValue();
for(++it; it != vec.end(); ++it)
{
os << delim.c_str() << (*it)->getValue();
}
}
os << std::endl;
return *this;