summaryrefslogtreecommitdiff
path: root/games/spring/files/patch-rts_Sim_Misc_SimObjectIDPool.cpp
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@FreeBSD.org>2021-04-22 15:05:40 +0300
committerDmitry Marakasov <amdmi3@FreeBSD.org>2022-02-25 22:12:28 +0300
commit33c9707d8b57fab77399b00747f04e3478770167 (patch)
treef7d28e4508e0a333e84901580f637972a8e774b8 /games/spring/files/patch-rts_Sim_Misc_SimObjectIDPool.cpp
parentdatabases/postgis32: Update to 3.2 (diff)
games/spring: update to 105.0.1
PR: 254732
Diffstat (limited to 'games/spring/files/patch-rts_Sim_Misc_SimObjectIDPool.cpp')
-rw-r--r--games/spring/files/patch-rts_Sim_Misc_SimObjectIDPool.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/games/spring/files/patch-rts_Sim_Misc_SimObjectIDPool.cpp b/games/spring/files/patch-rts_Sim_Misc_SimObjectIDPool.cpp
new file mode 100644
index 000000000000..3cd82038751c
--- /dev/null
+++ b/games/spring/files/patch-rts_Sim_Misc_SimObjectIDPool.cpp
@@ -0,0 +1,13 @@
+--- rts/Sim/Misc/SimObjectIDPool.cpp.orig 2020-12-26 12:45:43 UTC
++++ rts/Sim/Misc/SimObjectIDPool.cpp
+@@ -25,8 +25,8 @@ void SimObjectIDPool::Expand(unsigned int baseID, unsi
+ std::generate(newIDs.begin(), newIDs.begin() + numIDs, [&baseID]() { return (baseID++); });
+
+ // randomize so that Lua widgets can not easily determine counts
+- std::random_shuffle(newIDs.begin(), newIDs.begin() + numIDs, gsRNG);
+- std::random_shuffle(newIDs.begin(), newIDs.begin() + numIDs, gsRNG);
++ std::shuffle(newIDs.begin(), newIDs.begin() + numIDs, gsRNG);
++ std::shuffle(newIDs.begin(), newIDs.begin() + numIDs, gsRNG);
+
+ // lambda capture ("[n = baseID]() mutable { return (n++); }") requires std=c++14
+ baseID -= numIDs;