[yul-phaser] AlgorithmRunner: Create a structure to store runner's options

This commit is contained in:
Kamil Śliwak
2020-03-13 11:21:23 +01:00
parent b8244f6a43
commit 2110bf10cf
4 changed files with 25 additions and 10 deletions
+2 -2
View File
@@ -20,9 +20,9 @@
using namespace std;
using namespace solidity::phaser;
void AlgorithmRunner::run(GeneticAlgorithm& _algorithm, optional<size_t> _numRounds)
void AlgorithmRunner::run(GeneticAlgorithm& _algorithm)
{
for (size_t round = 0; !_numRounds.has_value() || round < _numRounds.value(); ++round)
for (size_t round = 0; !m_options.maxRounds.has_value() || round < m_options.maxRounds.value(); ++round)
{
m_population = _algorithm.runNextRound(m_population);