16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-18 00:49:19 +02:00

Replace count_trailing_zeros with std::countr_zero

This commit is contained in:
docentYT
2026-05-01 17:43:43 +02:00
parent ec1dfae953
commit 0e6950a386
3 changed files with 3 additions and 15 deletions

View File

@@ -457,14 +457,4 @@ std::string deserialize_random_set(cParser &Input, char const *Break)
// shouldn't ever get here but, eh
return "";
}
}
int count_trailing_zeros(uint32_t val)
{
int r = 0;
for (uint32_t shift = 1; !(val & shift); shift <<= 1)
r++;
return r;
}
}