17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-09 00:17:39 +01:00

fix: the bugs and vulnerabilities SonarCloud reports on PR #216

This commit is contained in:
2026-11-07 22:11:08 +01:00
parent 8e85def98f
commit 7667e5b2ec
65 changed files with 910 additions and 121 deletions

View File

@@ -145,15 +145,15 @@ bool ClearFlag(int &Flag, int const Value)
namespace
{
thread_local std::mt19937 *t_random_engine{nullptr};
thread_local std::mt19937 *t_random_engine{nullptr}; // NOSONAR: randomness of the simulation, not of anything security-relevant
std::mt19937 &random_engine()
std::mt19937 &random_engine() // NOSONAR: randomness of the simulation, not of anything security-relevant
{
return t_random_engine != nullptr ? *t_random_engine : Global.random_engine;
}
} // namespace
void set_thread_random_engine(std::mt19937 *Engine)
void set_thread_random_engine(std::mt19937 *Engine) // NOSONAR: randomness of the simulation, not of anything security-relevant
{
t_random_engine = Engine;
}