Преглед изворни кода

video_core/gpu_thread: Tidy up SwapBuffers()

We can just use std::nullopt and std::make_optional to make this a
little bit less noisy.
Lioncash пре 6 година
родитељ
комит
aed6d8bef5
1 измењених фајлова са 1 додато и 2 уклоњено
  1. 1 2
      src/video_core/gpu_thread.cpp

+ 1 - 2
src/video_core/gpu_thread.cpp

@@ -71,8 +71,7 @@ void ThreadManager::SubmitList(Tegra::CommandList&& entries) {
 }
 
 void ThreadManager::SwapBuffers(const Tegra::FramebufferConfig* framebuffer) {
-    PushCommand(SwapBuffersCommand(framebuffer ? *framebuffer
-                                               : std::optional<const Tegra::FramebufferConfig>{}));
+    PushCommand(SwapBuffersCommand(framebuffer ? std::make_optional(*framebuffer) : std::nullopt));
 }
 
 void ThreadManager::FlushRegion(CacheAddr addr, u64 size) {