From 7b29192c247bb203d690935041217ec40afe1310 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Thu, 20 Dec 2018 08:58:16 +1100 Subject: [PATCH] Fix use of removed std::random_shuffle --- src/hash_map.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hash_map.cc b/src/hash_map.cc index 56189aefa..4e45ab26c 100644 --- a/src/hash_map.cc +++ b/src/hash_map.cc @@ -69,7 +69,7 @@ UnitTest test_hash_map{[] { ref.push_back({key, value}); map.insert({key, value}); - std::random_shuffle(ref.begin(), ref.end()); + std::shuffle(ref.begin(), ref.end(), re); for (auto& elem : ref) { auto it = map.find(elem.first); @@ -89,7 +89,7 @@ void do_profile(size_t count, StringView type) Vector vec; for (size_t i = 0; i < count; ++i) vec.push_back(i); - std::random_shuffle(vec.begin(), vec.end()); + std::shuffle(vec.begin(), vec.end(), re); Map map; auto start = Clock::now();