Skip to content

Commit

Permalink
Fixed deprecation of std::random_shuffle
Browse files Browse the repository at this point in the history
  • Loading branch information
marip8 committed Nov 21, 2024
1 parent ead7a28 commit aed2504
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/reach_study.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <boost/filesystem.hpp>
#include <boost_plugin_loader/plugin_loader.hpp>
#include <numeric>
#include <random>
#include <signal.h>
#include <thread>
#include <yaml-cpp/yaml.h>
Expand Down Expand Up @@ -178,7 +179,7 @@ void ReachStudy::optimize()
current_counter = 0;

// Randomize
std::random_shuffle(rand_vec.begin(), rand_vec.end());
std::shuffle(rand_vec.begin(), rand_vec.end(), std::mt19937{});

#pragma omp parallel for num_threads(params_.max_threads)
for (std::size_t i = 0; i < rand_vec.size(); ++i)
Expand Down

0 comments on commit aed2504

Please sign in to comment.