mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-12-11 14:19:10 +00:00
Fixed return strict const iterator, replace to range-based loop C++17 and code refactor (#548)
Signed-off-by: Herman Semenov <GermanAizek@yandex.ru> Co-authored-by: georgemoralis <giorgosmrls@gmail.com>
This commit is contained in:
@@ -59,7 +59,7 @@ public:
|
||||
for (auto it = wait_list.begin(); it != wait_list.end();) {
|
||||
auto* waiter = *it;
|
||||
if (waiter->need_count > token_count) {
|
||||
it++;
|
||||
++it;
|
||||
continue;
|
||||
}
|
||||
it = wait_list.erase(it);
|
||||
@@ -148,7 +148,7 @@ public:
|
||||
// Find the first with priority less then us and insert right before it.
|
||||
auto it = wait_list.begin();
|
||||
while (it != wait_list.end() && (*it)->priority > waiter->priority) {
|
||||
it++;
|
||||
++it;
|
||||
}
|
||||
wait_list.insert(it, waiter);
|
||||
return it;
|
||||
|
||||
Reference in New Issue
Block a user