refactor: use popcnt
This commit is contained in:
1 parent
a5f93fd194
commit
1ffc42b7d2
3 files changed
+5
-13
No files matched your search
@@ -301,9 +301,9 @@ internal sealed class ChatLog : IUiComponent {
|
||||
return;
|
||||
}
|
||||
|
||||
var bits = NumUtil.NumberOfSetBits((uint) modifier);
|
||||
var bits = BitOperations.PopCount((uint) modifier);
|
||||
if (!turnedOff.TryGetValue(key, out var previousBits) || previousBits.Item1 < bits) {
|
||||
turnedOff[key] = (bits, toIntercept);
|
||||
turnedOff[key] = ((uint) bits, toIntercept);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user