diff options
author | Lioncash <mathew1800@gmail.com> | 2020-11-20 04:44:42 -0500 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2020-11-20 04:44:44 -0500 |
commit | ba3916fc67bac5f9cb40ebc91fccca065e877174 (patch) | |
tree | 3967be53e9f380ba236843fe576754069666a2f7 | |
parent | 3fcc98e11adc1cafc4644483a81b29e55e90d11a (diff) |
async_shaders: Simplify implementation of GetCompletedWork()
This is equivalent to moving all the contents and then clearing the
vector. This avoids a redundant allocation.
-rw-r--r-- | src/video_core/shader/async_shaders.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/video_core/shader/async_shaders.cpp b/src/video_core/shader/async_shaders.cpp index c6bd75b7c..85cda31c0 100644 --- a/src/video_core/shader/async_shaders.cpp +++ b/src/video_core/shader/async_shaders.cpp @@ -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; |