change result back to std::optional

This commit is contained in:
gal20 2020-11-14 21:46:29 +02:00 committed by GitHub
parent 5055212063
commit 8b82a228f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -254,7 +254,7 @@ public:
explicit ShaderDoubleCache(bool separable) : separable(separable) {} explicit ShaderDoubleCache(bool separable) : separable(separable) {}
std::tuple<GLuint, std::optional<ShaderDecompiler::ProgramResult>> Get( std::tuple<GLuint, std::optional<ShaderDecompiler::ProgramResult>> Get(
const KeyConfigType& key, const Pica::Shader::ShaderSetup& setup) { const KeyConfigType& key, const Pica::Shader::ShaderSetup& setup) {
ShaderDecompiler::ProgramResult result{}; std::optional<ShaderDecompiler::ProgramResult> result{};
auto map_it = shader_map.find(key); auto map_it = shader_map.find(key);
if (map_it == shader_map.end()) { if (map_it == shader_map.end()) {
auto program_opt = CodeGenerator(setup, key, separable); auto program_opt = CodeGenerator(setup, key, separable);