Fix build failure on GCC 5.4

This commit is contained in:
Eelco Dolstra
2016-09-30 17:05:07 +02:00
parent fb5e7f9570
commit b1512a152a
3 changed files with 6 additions and 4 deletions

View File

@ -1,4 +1,5 @@
#include <algorithm>
#include <cmath>
#include <thread>
#include <unordered_map>
@ -119,8 +120,8 @@ system_time State::doDispatch()
sort(machinesSorted.begin(), machinesSorted.end(),
[](const MachineInfo & a, const MachineInfo & b) -> bool
{
float ta = roundf(a.currentJobs / a.machine->speedFactor);
float tb = roundf(b.currentJobs / b.machine->speedFactor);
float ta = std::round(a.currentJobs / a.machine->speedFactor);
float tb = std::round(b.currentJobs / b.machine->speedFactor);
return
ta != tb ? ta < tb :
a.machine->speedFactor != b.machine->speedFactor ? a.machine->speedFactor > b.machine->speedFactor :