Skip to content

Commit cc75993

Browse files
authored
MINOR: [C++] Replace std::random_shuffle with std::shuffle (#13948)
`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]>
1 parent 8b89147 commit cc75993

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎cpp/src/arrow/adapters/orc/adapter_test.cc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ void RandWeakComposition(int64_t n, T sum, std::vector<U>* out) {
173173
return static_cast<U>(res);
174174
});
175175
(*out)[n - 1] += remaining_sum;
176-
std::random_shuffle(out->begin(), out->end());
176+
std::shuffle(out->begin(), out->end(), gen);
177177
}
178178

179179
std::shared_ptr<ChunkedArray> GenerateRandomChunkedArray(

0 commit comments

Comments
 (0)