Enable the -Wconversion warning

This commit is contained in:
Alex Beregszaszi
2020-12-08 16:45:24 +00:00
parent 71a4a4efb1
commit 7e88ba8da0
56 changed files with 171 additions and 176 deletions
+1 -1
View File
@@ -171,7 +171,7 @@ function<Crossover> phaser::fixedPointCrossover(double _crossoverPoint)
return [=](Chromosome const& _chromosome1, Chromosome const& _chromosome2)
{
size_t minLength = min(_chromosome1.length(), _chromosome2.length());
size_t concretePoint = static_cast<size_t>(round(minLength * _crossoverPoint));
size_t concretePoint = static_cast<size_t>(round(double(minLength) * _crossoverPoint));
return get<0>(fixedPointSwap(_chromosome1, _chromosome2, concretePoint));
};