mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 13:50:03 +00:00 
			
		
		
		
	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. Co-Authored-By: LC <712067+lioncash@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									aced133a3d
								
							
						
					
					
						commit
						51d348b087
					
				
					 5 changed files with 9 additions and 9 deletions
				
			
		|  | @ -928,7 +928,7 @@ std::optional<ProgramResult> DecompileProgram(const Pica::Shader::ProgramCode& p | |||
|         return {ProgramResult{generator.MoveShaderCode()}}; | ||||
|     } catch (const DecompileFail& exception) { | ||||
|         LOG_INFO(HW_GPU, "Shader decompilation failed: {}", exception.what()); | ||||
|         return {}; | ||||
|         return std::nullopt; | ||||
|     } | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -1651,7 +1651,7 @@ std::optional<ShaderDecompiler::ProgramResult> GenerateVertexShader( | |||
|         get_output_reg, config.state.sanitize_mul); | ||||
| 
 | ||||
|     if (!program_source_opt) | ||||
|         return {}; | ||||
|         return std::nullopt; | ||||
| 
 | ||||
|     std::string& program_source = program_source_opt->code; | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue