mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
Merge pull request #5727
7b9a420
Replace std::random_shuffle with std::shuffle (tomsmeding)
This commit is contained in:
commit
f205d28e96
5 changed files with 7 additions and 7 deletions
|
@ -779,8 +779,8 @@ TEST(ringct, range_proofs_accept_very_long_simple)
|
|||
inputs[n] = n;
|
||||
outputs[n] = n;
|
||||
}
|
||||
std::random_shuffle(inputs, inputs + N);
|
||||
std::random_shuffle(outputs, outputs + N);
|
||||
std::shuffle(inputs, inputs + N, crypto::random_device{});
|
||||
std::shuffle(outputs, outputs + N, crypto::random_device{});
|
||||
EXPECT_TRUE(range_proof_test(true, NELTS(inputs), inputs, NELTS(outputs), outputs, false, true));
|
||||
}
|
||||
|
||||
|
|
|
@ -143,7 +143,7 @@ TEST(rolling_median, order)
|
|||
m.insert(random[i]);
|
||||
ASSERT_EQ(med, m.median());
|
||||
|
||||
std::shuffle(random.begin(), random.end(), std::default_random_engine(crypto::rand<unsigned>()));
|
||||
std::shuffle(random.begin(), random.end(), crypto::random_device{});
|
||||
m.clear();
|
||||
for (int i = 0; i < 1000; ++i)
|
||||
m.insert(random[i]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue