1
0
Fork 0
forked from suyu/suyu

async_shaders: Resolve -Wpessimizing-move warning

Prevents pessimization of the move constructor (which thankfully didn't
actually happen in practice here, given std::thread isn't copyable).
This commit is contained in:
Lioncash 2020-08-14 08:16:03 -04:00
parent e050594706
commit 6b13d08822

View file

@ -34,8 +34,8 @@ void AsyncShaders::AllocateWorkers(std::size_t num_workers) {
// Create workers // Create workers
for (std::size_t i = 0; i < num_workers; i++) { for (std::size_t i = 0; i < num_workers; i++) {
context_list.push_back(emu_window.CreateSharedContext()); context_list.push_back(emu_window.CreateSharedContext());
worker_threads.push_back(std::move( worker_threads.push_back(
std::thread(&AsyncShaders::ShaderCompilerThread, this, context_list[i].get()))); std::thread(&AsyncShaders::ShaderCompilerThread, this, context_list[i].get()));
} }
} }