Procházet zdrojové kódy

async_shaders: emplace threads into the worker thread vector

Same behavior, but constructs the threads in place instead of moving
them.
Lioncash před 5 roky
rodič
revize
01db5cf203
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 2 2
      src/video_core/shader/async_shaders.cpp

+ 2 - 2
src/video_core/shader/async_shaders.cpp

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