mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-16 20:41:44 +00:00
scudo: Switch from std::random_shuffle to std::shuffle in a test.
This lets the test build with C++17. Differential Revision: https://reviews.llvm.org/D70471
This commit is contained in:
parent
69242e9868
commit
10089ce202
@ -14,6 +14,7 @@
|
||||
|
||||
#include <condition_variable>
|
||||
#include <mutex>
|
||||
#include <random>
|
||||
#include <thread>
|
||||
|
||||
template <class SecondaryT> static void testSecondaryBasic(void) {
|
||||
@ -42,7 +43,7 @@ template <class SecondaryT> static void testSecondaryBasic(void) {
|
||||
std::vector<void *> V;
|
||||
for (scudo::uptr I = 0; I < 32U; I++)
|
||||
V.push_back(L->allocate(Size));
|
||||
std::random_shuffle(V.begin(), V.end());
|
||||
std::shuffle(V.begin(), V.end(), std::mt19937(std::random_device()()));
|
||||
while (!V.empty()) {
|
||||
L->deallocate(V.back());
|
||||
V.pop_back();
|
||||
|
Loading…
Reference in New Issue
Block a user