fixed error in numberOfQueuedPayloads in fr_fcfs

This commit is contained in:
robert
2014-07-01 13:35:14 +02:00
parent 37c147ba2f
commit 4c7c585968
4 changed files with 23 additions and 17 deletions

View File

@@ -168,8 +168,8 @@ void Simulation::report(string message)
unsigned int Simulation::getNumberOfLines(string uri)
{
std::ifstream file(uri);
file.unsetf(std::ios_base::skipws); // new lines will be skipped unless we stop it from happening:
// count the newlines with an algorithm specialized for counting:
// count the newlines
file.unsetf(std::ios_base::skipws);
unsigned lineCount = std::count(std::istream_iterator<char>(file), std::istream_iterator<char>(), '\n');
return lineCount;
}