Replace boost::mt19937 with std::mt19937

Available since C++11 and already used in the codebase.

Ref: #8210
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
This commit is contained in:
Ralph Sennhauser
2025-07-17 19:59:56 +02:00
parent a2f15bae4e
commit 6f2f8c13bf
6 changed files with 15 additions and 24 deletions
+1 -3
View File
@@ -29,8 +29,6 @@
#include "lib/timer.h"
#include "maths/MathUtil.h"
#include <boost/random/uniform_int_distribution.hpp>
namespace
{
/**
@@ -594,7 +592,7 @@ std::set<CStr> CObjectBase::CalculateRandomRemainingSelections(rng_t& rng, const
// Choose a random number in the interval [0..totalFreq) to choose one of the variants.
// If the diversity is "none", force 0 to return the first valid variant.
int randNum = diversity == CObjectManager::VariantDiversity::NONE ? 0 : boost::random::uniform_int_distribution<int>(0, totalFreq-1)(rng);
int randNum = diversity == CObjectManager::VariantDiversity::NONE ? 0 : std::uniform_int_distribution<int>(0, totalFreq - 1)(rng);
for (size_t i = 0; i < grp->size(); ++i)
{
randNum -= (allZero ? 1 : (*grp)[i].m_Frequency);