mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-11-17 04:38:15 +01:00
async_shaders: Simplify implementation of GetCompletedWork()
This is equivalent to moving all the contents and then clearing the vector. This avoids a redundant allocation.
This commit is contained in:
1 parent
088767da00
commit
a15dc601be
1 file changed
+1
-2
@@ -106,8 +106,7 @@ std::vector<AsyncShaders::Result> AsyncShaders::GetCompletedWork() {
|
||||
std::vector<Result> results;
|
||||
{
|
||||
std::unique_lock lock{completed_mutex};
|
||||
results.assign(std::make_move_iterator(finished_work.begin()),
|
||||
std::make_move_iterator(finished_work.end()));
|
||||
results = std::move(finished_work);
|
||||
finished_work.clear();
|
||||
}
|
||||
return results;
|
||||
|
||||
Reference in new issue
Block a user