kern: optimize postfix-compare to prefix-compare, result logic is identical but breaks earlier in some paths

This commit is contained in:
Michael Scire 2022-06-07 23:49:31 -07:00
parent 5f2d713fe4
commit 20d200471d

View file

@ -132,7 +132,7 @@ namespace ams::kern {
auto tmp_it = it;
s32 tmp_num_waiters = 0;
while ((++tmp_it != m_tree.end()) && (tmp_it->GetAddressArbiterKey() == addr)) {
if ((tmp_num_waiters++) >= count) {
if ((++tmp_num_waiters) >= count) {
break;
}
}