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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user