mirror of
https://github.com/zeldaret/botw
synced 2026-05-23 23:05:14 -04:00
Use sead::OffsetList::robustRange() when possible to simplify iteration
This commit is contained in:
@@ -31,9 +31,9 @@ void TaskQueueBase::clear() {
|
||||
lock();
|
||||
|
||||
// Clear all tasks.
|
||||
for (auto it = mActiveTasks.robustBegin(), end = mActiveTasks.robustEnd(); it != end; ++it) {
|
||||
mActiveTasks.erase(std::addressof(*it));
|
||||
it->onRemove();
|
||||
for (auto& task : mActiveTasks.robustRange()) {
|
||||
mActiveTasks.erase(&task);
|
||||
task.onRemove();
|
||||
}
|
||||
mActiveTasks.clear();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user