aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/shader/async_shaders.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2020-11-20 04:44:42 -0500
committerLioncash <mathew1800@gmail.com>2020-11-20 04:44:44 -0500
commita15dc601be59609c730c950b0a55bbbbce8c9a2a (patch)
tree3967be53e9f380ba236843fe576754069666a2f7 /src/video_core/shader/async_shaders.cpp
parent088767da003096ee7299e6bd685cd1e095838369 (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.
Diffstat (limited to 'src/video_core/shader/async_shaders.cpp')
-rw-r--r--src/video_core/shader/async_shaders.cpp3
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 c6bd75b7c6..85cda31c0e 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;