Skip to content
Snippets Groups Projects
Commit 0f78a579 authored by Sergey Sharybin's avatar Sergey Sharybin
Browse files

Make BLI_edgehash_test compatible with C++17

random_shuffle was removed (at least the used version).
parent 31ae8338
No related branches found
No related tags found
No related merge requests found
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
#include "testing/testing.h" #include "testing/testing.h"
#include <algorithm> #include <algorithm>
#include <random>
#include <vector> #include <vector>
extern "C" { extern "C" {
...@@ -320,7 +321,7 @@ TEST(edgehash, StressTest) ...@@ -320,7 +321,7 @@ TEST(edgehash, StressTest)
} }
std::vector<Edge> shuffled = edges; std::vector<Edge> shuffled = edges;
std::random_shuffle(shuffled.begin(), shuffled.end()); std::shuffle(shuffled.begin(), shuffled.end(), std::default_random_engine());
/* then remove half of them */ /* then remove half of them */
int remove_until = shuffled.size() / 2; int remove_until = shuffled.size() / 2;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment