summaryrefslogtreecommitdiff
path: root/games/spring/files/patch-rts_Sim_Misc_SimObjectIDPool.cpp
diff options
context:
space:
mode:
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;