summaryrefslogtreecommitdiff
path: root/src/video_core/macro/macro.cpp
diff options
context:
space:
mode:
authorGravatar Lioncash2020-09-22 17:31:53 -0400
committerGravatar Lioncash2020-09-22 17:32:33 -0400
commitff45c3957858cdf189b73e11550da06fe4337b8e (patch)
tree288ff1cc4677d6511ed8cc7e1b0db20ce2d2590f /src/video_core/macro/macro.cpp
parentMerge pull request #4697 from lioncash/copy5 (diff)
downloadyuzu-ff45c3957858cdf189b73e11550da06fe4337b8e.tar.gz
yuzu-ff45c3957858cdf189b73e11550da06fe4337b8e.tar.xz
yuzu-ff45c3957858cdf189b73e11550da06fe4337b8e.zip
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.
Diffstat (limited to 'src/video_core/macro/macro.cpp')
-rw-r--r--src/video_core/macro/macro.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/video_core/macro/macro.cpp b/src/video_core/macro/macro.cpp
index a50e7b4e0..cd21a2112 100644
--- a/src/video_core/macro/macro.cpp
+++ b/src/video_core/macro/macro.cpp
@@ -36,7 +36,7 @@ void MacroEngine::Execute(Engines::Maxwell3D& maxwell3d, u32 method,
36 } 36 }
37 } else { 37 } else {
38 // Macro not compiled, check if it's uploaded and if so, compile it 38 // Macro not compiled, check if it's uploaded and if so, compile it
39 std::optional<u32> mid_method = std::nullopt; 39 std::optional<u32> mid_method;
40 const auto macro_code = uploaded_macro_code.find(method); 40 const auto macro_code = uploaded_macro_code.find(method);
41 if (macro_code == uploaded_macro_code.end()) { 41 if (macro_code == uploaded_macro_code.end()) {
42 for (const auto& [method_base, code] : uploaded_macro_code) { 42 for (const auto& [method_base, code] : uploaded_macro_code) {