fixed eoFileMonitor bug when vector is empty
This commit is contained in:
parent
922be5f0bc
commit
8080d1b345
1 changed files with 10 additions and 8 deletions
|
|
@ -73,14 +73,16 @@ eoMonitor& eoFileMonitor::operator()(void)
|
||||||
|
|
||||||
eoMonitor& eoFileMonitor::operator()(std::ostream& os)
|
eoMonitor& eoFileMonitor::operator()(std::ostream& os)
|
||||||
{
|
{
|
||||||
|
if (vec.size() > 0)
|
||||||
iterator it = vec.begin();
|
|
||||||
|
|
||||||
os << (*it)->getValue();
|
|
||||||
|
|
||||||
for(++it; it != vec.end(); ++it)
|
|
||||||
{
|
{
|
||||||
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;
|
os << std::endl;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue