From ba165b10926de0e5f4280c621dae87e30ce29c97 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 9 May 2019 18:39:18 -0400 Subject: [PATCH] video_core/gpu_thread: Remove unused local variable Instead of retrieving the data from the std::variant instance, we can just check if the variant contains that type of data. This is essentially the same behavior, only it returns a bool indicating whether or not the type in the variant is currently active, instead of actually retrieving the data. --- src/video_core/gpu_thread.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video_core/gpu_thread.cpp b/src/video_core/gpu_thread.cpp index c9a2077de..03856013f 100644 --- a/src/video_core/gpu_thread.cpp +++ b/src/video_core/gpu_thread.cpp @@ -44,7 +44,7 @@ static void RunThread(VideoCore::RendererBase& renderer, Tegra::DmaPusher& dma_p renderer.Rasterizer().FlushRegion(data->addr, data->size); } else if (const auto data = std::get_if(&next.data)) { renderer.Rasterizer().InvalidateRegion(data->addr, data->size); - } else if (const auto data = std::get_if(&next.data)) { + } else if (std::holds_alternative(next.data)) { return; } else { UNREACHABLE();