Merge pull request #804 from larsclausen/swap-elaboration_work_list

Use std::swap() to exchange elaboration_work_list
This commit is contained in:
Stephen Williams 2022-12-11 13:17:09 -08:00 committed by GitHub
commit 3509cc86f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 4 deletions

View File

@ -7215,10 +7215,7 @@ Design* elaborate(list<perm_string>roots)
// Transfer the queue to a temporary queue.
list<elaborator_work_item_t*> cur_queue;
while (! des->elaboration_work_list.empty()) {
cur_queue.push_back(des->elaboration_work_list.front());
des->elaboration_work_list.pop_front();
}
std::swap(cur_queue, des->elaboration_work_list);
// Run from the temporary queue. If the temporary queue
// items create new work queue items, they will show up