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

dash: removing useless loop

parent cbf5438d
...@@ -51,15 +51,12 @@ Chunk* AlwaysBestAdaptationLogic::getNextChunk() throw(EOFException) ...@@ -51,15 +51,12 @@ Chunk* AlwaysBestAdaptationLogic::getNextChunk() throw(EOFException)
if(this->count == this->schedule.size()) if(this->count == this->schedule.size())
throw EOFException(); throw EOFException();
for(size_t i = 0; i < this->schedule.size(); i++) if ( this->count < this->schedule.size() )
{ {
if(this->count == i) Chunk *chunk = new Chunk();
{ chunk->setUrl(this->schedule.at( this->count )->getSourceUrl());
Chunk *chunk = new Chunk(); this->count++;
chunk->setUrl(this->schedule.at(i)->getSourceUrl()); return chunk;
this->count++;
return chunk;
}
} }
return NULL; 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