From ff45c3957858cdf189b73e11550da06fe4337b8e Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 22 Sep 2020 17:31:53 -0400 Subject: General: Make use of std::nullopt where applicable Allows some implementations to avoid completely zeroing out the internal buffer of the optional, and instead only set the validity byte within the structure. This also makes it consistent how we return empty optionals. --- src/video_core/engines/maxwell_3d.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/video_core/engines') diff --git a/src/video_core/engines/maxwell_3d.cpp b/src/video_core/engines/maxwell_3d.cpp index 33854445f..57ebc785f 100644 --- a/src/video_core/engines/maxwell_3d.cpp +++ b/src/video_core/engines/maxwell_3d.cpp @@ -597,7 +597,7 @@ std::optional Maxwell3D::GetQueryResult() { // Deferred. rasterizer->Query(regs.query.QueryAddress(), VideoCore::QueryType::SamplesPassed, system.GPU().GetTicks()); - return {}; + return std::nullopt; default: LOG_DEBUG(HW_GPU, "Unimplemented query select type {}", static_cast(regs.query.query_get.select.Value())); -- cgit v1.2.3