mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-13 05:40:42 +01:00
Switch from deprecated std::random_shuffle on std::shuffle
Bug: None Change-Id: I70320f4c7bdd18488f0bbd9fdd6c171c4a8257bb Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127896 Commit-Queue: Artem Titov <titovartem@webrtc.org> Reviewed-by: Oleksandr Iakovenko <iakovenko@google.com> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Cr-Commit-Position: refs/heads/master@{#27218}
This commit is contained in:
parent
982b576bca
commit
d2a637858a
1 changed files with 2 additions and 1 deletions
|
@ -12,6 +12,7 @@
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <random>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "test/gtest.h"
|
#include "test/gtest.h"
|
||||||
|
@ -24,7 +25,7 @@ SamplesStatsCounter CreateStatsFilledWithIntsFrom1ToN(int n) {
|
||||||
for (int i = 1; i <= n; i++) {
|
for (int i = 1; i <= n; i++) {
|
||||||
data.push_back(i);
|
data.push_back(i);
|
||||||
}
|
}
|
||||||
std::random_shuffle(data.begin(), data.end());
|
std::shuffle(data.begin(), data.end(), std::mt19937(std::random_device()()));
|
||||||
|
|
||||||
SamplesStatsCounter stats;
|
SamplesStatsCounter stats;
|
||||||
for (double v : data) {
|
for (double v : data) {
|
||||||
|
|
Loading…
Reference in a new issue