summaryrefslogtreecommitdiff
path: root/src/video_core/macro/macro.cpp
diff options
context:
space:
mode:
authorGravatar Lioncash2022-01-25 13:50:10 -0500
committerGravatar Lioncash2022-01-25 13:50:14 -0500
commitcfd9f7d25b4c1aea49b4dc017990f12142b8302b (patch)
tree7ab83e57f2340b5447738cdc195489312e530a54 /src/video_core/macro/macro.cpp
parentvideo_core/macro: Remove unused parameter from Execute() (diff)
downloadyuzu-cfd9f7d25b4c1aea49b4dc017990f12142b8302b.tar.gz
yuzu-cfd9f7d25b4c1aea49b4dc017990f12142b8302b.tar.xz
yuzu-cfd9f7d25b4c1aea49b4dc017990f12142b8302b.zip
video_core/macro_hle: Return unique_ptr directly from GetHLEProgram()
Same behavior, but less code and header dependencies.
Diffstat (limited to 'src/video_core/macro/macro.cpp')
-rw-r--r--src/video_core/macro/macro.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/video_core/macro/macro.cpp b/src/video_core/macro/macro.cpp
index 0870a7687..0ae78a9e5 100644
--- a/src/video_core/macro/macro.cpp
+++ b/src/video_core/macro/macro.cpp
@@ -65,10 +65,9 @@ void MacroEngine::Execute(u32 method, const std::vector<u32>& parameters) {
65 cache_info.lle_program = Compile(code); 65 cache_info.lle_program = Compile(code);
66 } 66 }
67 67
68 auto hle_program = hle_macros->GetHLEProgram(cache_info.hash); 68 if (auto hle_program = hle_macros->GetHLEProgram(cache_info.hash)) {
69 if (hle_program.has_value()) {
70 cache_info.has_hle_program = true; 69 cache_info.has_hle_program = true;
71 cache_info.hle_program = std::move(hle_program.value()); 70 cache_info.hle_program = std::move(hle_program);
72 cache_info.hle_program->Execute(parameters, method); 71 cache_info.hle_program->Execute(parameters, method);
73 } else { 72 } else {
74 cache_info.lle_program->Execute(parameters, method); 73 cache_info.lle_program->Execute(parameters, method);