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