Skip to content

Commit

Permalink
replace std::random_shuffle to std::shuffle (apache#14523)
Browse files Browse the repository at this point in the history
  • Loading branch information
higumachan authored and haohuw committed Jun 23, 2019
1 parent 7a4d70a commit d76817f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/io/image_aug_default.cc
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ class DefaultImageAugmenter : public ImageAugmenter {
float alpha_s = 1.0 + std::uniform_real_distribution<float>(-param_.saturation,
param_.saturation)(*prnd);
int rand_order[3] = {0, 1, 2};
std::random_shuffle(std::begin(rand_order), std::end(rand_order));
std::shuffle(std::begin(rand_order), std::end(rand_order), *prnd);
for (int i : rand_order) {
if (i == 0) {
// brightness
Expand Down

0 comments on commit d76817f

Please sign in to comment.