1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-17 00:07:41 +02:00

vcmi: modernize rest of lib

This commit is contained in:
Konstantin
2023-03-14 00:26:44 +03:00
parent 17520b70ce
commit 4c4498b22a
70 changed files with 1278 additions and 1463 deletions

View File

@ -29,7 +29,7 @@ void CRandomGenerator::resetSeed()
{
boost::hash<std::string> stringHash;
auto threadIdHash = stringHash(boost::lexical_cast<std::string>(boost::this_thread::get_id()));
setSeed((int)(threadIdHash * std::time(nullptr)));
setSeed(static_cast<int>(threadIdHash * std::time(nullptr)));
}
TRandI CRandomGenerator::getIntRange(int lower, int upper)
@ -83,7 +83,7 @@ CRandomGenerator & CRandomGenerator::getDefault()
{
defaultRand.reset(new CRandomGenerator());
}
return *defaultRand.get();
return *defaultRand;
}
TGenerator & CRandomGenerator::getStdGenerator()