video_core/macro_hle: Return unique_ptr directly from GetHLEProgram()

Same behavior, but less code and header dependencies.
This commit is contained in:
Lioncash
2022-01-25 13:50:10 -05:00
parent a05d9405b9
commit cfd9f7d25b
3 changed files with 7 additions and 7 deletions

View File

@ -5,7 +5,6 @@
#pragma once
#include <memory>
#include <optional>
#include "common/common_types.h"
namespace Tegra {
@ -19,7 +18,9 @@ public:
explicit HLEMacro(Engines::Maxwell3D& maxwell3d_);
~HLEMacro();
std::optional<std::unique_ptr<CachedMacro>> GetHLEProgram(u64 hash) const;
// Allocates and returns a cached macro if the hash matches a known function.
// Returns nullptr otherwise.
[[nodiscard]] std::unique_ptr<CachedMacro> GetHLEProgram(u64 hash) const;
private:
Engines::Maxwell3D& maxwell3d;