17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-17 05:09:20 +02:00

Add nosonar tags

This commit is contained in:
2026-10-09 18:40:31 +02:00
parent 1c28809dd7
commit 9935257783
12 changed files with 19 additions and 19 deletions

View File

@@ -723,7 +723,7 @@ std::string directive(std::string const &File, include_info const &Info, int con
else if (role == "name")
{
// names have to be unique in the scenery. the default value, or the name of the template, makes them recognizable
static std::mt19937 engine{std::random_device{}()};
static std::mt19937 engine{std::random_device{}()}; // NOSONAR
char suffix[16];
std::snprintf(suffix, sizeof(suffix), "_%08x", static_cast<unsigned int>(engine()));
value = (value.empty() ? std::filesystem::path(File).stem().string() : value) + suffix;