Commit f9d613c5 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

dash: removing useless loop

parent cbf5438d
......@@ -51,16 +51,13 @@ Chunk* AlwaysBestAdaptationLogic::getNextChunk() throw(EOFException)
if(this->count == this->schedule.size())
throw EOFException();
for(size_t i = 0; i < this->schedule.size(); i++)
{
if(this->count == i)
if ( this->count < this->schedule.size() )
{
Chunk *chunk = new Chunk();
chunk->setUrl(this->schedule.at(i)->getSourceUrl());
chunk->setUrl(this->schedule.at( this->count )->getSourceUrl());
this->count++;
return chunk;
}
}
return NULL;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment