mirror of
https://gitlab.ibr.cs.tu-bs.de/tschuber/ns-3-leo.git
synced 2025-06-08 18:13:57 +02:00
Add test for non-empty waypoint file
This commit is contained in:
parent
42787c2b41
commit
e1bca0b7d9
3 changed files with 57 additions and 5 deletions
|
@ -63,13 +63,16 @@ LeoWaypointInputFileStreamContainer::GetNextSample (Waypoint &sample)
|
|||
NS_ABORT_MSG ("Input stream is bad");
|
||||
}
|
||||
|
||||
while (!m_input.eof () && sample.time < m_lastTime)
|
||||
Time newLast = m_lastTime;
|
||||
while (m_input && sample.time < m_lastTime)
|
||||
{
|
||||
m_input >> sample;
|
||||
newLast = sample.time;
|
||||
}
|
||||
m_lastTime = sample.time;
|
||||
bool res = (newLast != m_lastTime) && m_input;
|
||||
m_lastTime = newLast;
|
||||
|
||||
return m_input.good ();
|
||||
return res;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue