Skip to content

Commit

Permalink
MINOR: [C++] Replace std::random_shuffle with std::shuffle (#13948)
Browse files Browse the repository at this point in the history
`std::random_shuffle` was deprecated in C++14 and removed altogether in C++17 in favor of `std::shuffle`. The codebase only uses these shuffling functions in tests and benchmarks and `std::shuffle` is used in all instances except this one.

Authored-by: Bryce Mecum <[email protected]>
Signed-off-by: Antoine Pitrou <[email protected]>
  • Loading branch information
amoeba authored Aug 23, 2022
1 parent 8b89147 commit cc75993
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cpp/src/arrow/adapters/orc/adapter_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ void RandWeakComposition(int64_t n, T sum, std::vector<U>* out) {
return static_cast<U>(res);
});
(*out)[n - 1] += remaining_sum;
std::random_shuffle(out->begin(), out->end());
std::shuffle(out->begin(), out->end(), gen);
}

std::shared_ptr<ChunkedArray> GenerateRandomChunkedArray(
Expand Down

0 comments on commit cc75993

Please sign in to comment.