diff options
| author | 2018-07-18 19:02:47 -0400 | |
|---|---|---|
| committer | 2018-07-18 19:34:31 -0400 | |
| commit | 46458e72846f2611f738e41ece6336472f5288d5 (patch) | |
| tree | df865f3749a15b3c7079d12d8e66df0fbb7ed05a /src/core/hle/kernel/scheduler.cpp | |
| parent | Merge pull request #681 from lioncash/const (diff) | |
| download | yuzu-46458e72846f2611f738e41ece6336472f5288d5.tar.gz yuzu-46458e72846f2611f738e41ece6336472f5288d5.tar.xz yuzu-46458e72846f2611f738e41ece6336472f5288d5.zip | |
core/memory, core/hle/kernel: Use std::move where applicable
Avoids pointless copies
Diffstat (limited to 'src/core/hle/kernel/scheduler.cpp')
| -rw-r--r-- | src/core/hle/kernel/scheduler.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/hle/kernel/scheduler.cpp b/src/core/hle/kernel/scheduler.cpp index ca8807e19..1f4abfbe8 100644 --- a/src/core/hle/kernel/scheduler.cpp +++ b/src/core/hle/kernel/scheduler.cpp | |||
| @@ -2,6 +2,8 @@ | |||
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include <utility> | ||
| 6 | |||
| 5 | #include "core/core.h" | 7 | #include "core/core.h" |
| 6 | #include "core/core_timing.h" | 8 | #include "core/core_timing.h" |
| 7 | #include "core/hle/kernel/process.h" | 9 | #include "core/hle/kernel/process.h" |
| @@ -113,7 +115,7 @@ void Scheduler::Reschedule() { | |||
| 113 | void Scheduler::AddThread(SharedPtr<Thread> thread, u32 priority) { | 115 | void Scheduler::AddThread(SharedPtr<Thread> thread, u32 priority) { |
| 114 | std::lock_guard<std::mutex> lock(scheduler_mutex); | 116 | std::lock_guard<std::mutex> lock(scheduler_mutex); |
| 115 | 117 | ||
| 116 | thread_list.push_back(thread); | 118 | thread_list.push_back(std::move(thread)); |
| 117 | ready_queue.prepare(priority); | 119 | ready_queue.prepare(priority); |
| 118 | } | 120 | } |
| 119 | 121 | ||