]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: replace deleted std function: randomshuffle 35146/head
authorWillem Jan Withagen <wjw@digiware.nl>
Wed, 20 May 2020 09:50:58 +0000 (09:50 +0000)
committerWillem Jan Withagen <wjw@digiware.nl>
Sun, 14 Jun 2020 13:08:33 +0000 (13:08 +0000)
fixes: https://github.com/ceph/ceph/pull/32927
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
src/rgw/rgw_lc.cc

index 7d083272bfe65048eb73f6b27f1b25094117dada..6e9bcdb7c7d21cf158cfed98818e38ed6a1cd01b 100644 (file)
@@ -1646,7 +1646,9 @@ static inline vector<int> random_sequence(uint32_t n)
     [ix = 0]() mutable {
       return ix++;
     });
-  std::random_shuffle(v.begin(), v.end());
+  std::random_device rd;
+  std::default_random_engine rng{rd()};
+  std::shuffle(v.begin(), v.end(), rd);
   return v;
 }