diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-05-17 21:29:54 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-05-17 21:29:54 -0700 |
commit | 4a7080b8dc98422b63dc5db3245029d3f689de15 (patch) | |
tree | ac9a37c4201bbdde1c4859bff695e1714ba67899 /src | |
parent | 9700fca02229f4c3e15425a2396740384f7736cb (diff) | |
download | binaryen-4a7080b8dc98422b63dc5db3245029d3f689de15.tar.gz binaryen-4a7080b8dc98422b63dc5db3245029d3f689de15.tar.bz2 binaryen-4a7080b8dc98422b63dc5db3245029d3f689de15.zip |
avoid deprecated random_shuffle (#524)
Diffstat (limited to 'src')
-rw-r--r-- | src/passes/CoalesceLocals.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/passes/CoalesceLocals.cpp b/src/passes/CoalesceLocals.cpp index a2976d089..17f6b08c3 100644 --- a/src/passes/CoalesceLocals.cpp +++ b/src/passes/CoalesceLocals.cpp @@ -514,9 +514,7 @@ void CoalesceLocalsWithLearning::pickIndices(std::vector<Index>& indices) { first = false; } else { // leave params alone, shuffle the rest - std::random_shuffle(ret->begin() + parent->getFunction()->getNumParams(), ret->end(), [this](int i) { - return noise() % i; - }); + std::shuffle(ret->begin() + parent->getFunction()->getNumParams(), ret->end(), noise); } calculateFitness(ret); #ifdef CFG_LEARN_DEBUG |