chromium,chromedriver: 129.0.6668.91 -> 129.0.6668.100
[NixPkgs.git] / pkgs / by-name / mu / musly / 0002-Fix-build-with-C-17.patch
blobf128bd4d0c02ae99af2f5049a1f81510fdb82f95
1 From 75efe27cbb03f2883e53e7a7f68386d93e2c1874 Mon Sep 17 00:00:00 2001
2 From: Emily <hello@emily.moe>
3 Date: Sat, 3 Aug 2024 12:17:19 +0100
4 Subject: [PATCH 2/4] Fix build with C++17
6 ---
7 musly/main.cpp | 5 ++++-
8 1 file changed, 4 insertions(+), 1 deletion(-)
10 diff --git a/musly/main.cpp b/musly/main.cpp
11 index a9644f2..bb8b7ae 100644
12 --- a/musly/main.cpp
13 +++ b/musly/main.cpp
14 @@ -14,6 +14,7 @@
15 #include <cstdio>
16 #include <iostream>
17 #include <fstream>
18 +#include <random>
19 #include <algorithm>
20 #include <limits>
21 #include <map>
22 @@ -239,7 +240,9 @@ tracks_initialize(
23 else {
24 // use a random subset of 1000 tracks
25 std::vector<musly_track*> tracks2(tracks);
26 - std::random_shuffle(tracks2.begin(), tracks2.end());
27 + std::random_device seeder;
28 + std::default_random_engine rng(seeder());
29 + std::shuffle(tracks2.begin(), tracks2.end(), rng);
30 ret = musly_jukebox_setmusicstyle(mj, tracks2.data(), 1000);
32 if (ret != 0) {
33 --
34 2.45.2