mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 22:02:44 +00:00 
			
		
		
		
	LibGfx: Decrease indent in ImageDecoder::try_create_for_raw_bytes() some
No behavior change.
This commit is contained in:
		
							parent
							
								
									f18e7659a6
								
							
						
					
					
						commit
						f09aaf826f
					
				
					 1 changed files with 8 additions and 10 deletions
				
			
		|  | @ -80,17 +80,15 @@ static OwnPtr<ImageDecoderPlugin> probe_and_sniff_for_appropriate_plugin_with_kn | ||||||
| 
 | 
 | ||||||
| RefPtr<ImageDecoder> ImageDecoder::try_create_for_raw_bytes(ReadonlyBytes bytes, Optional<DeprecatedString> mime_type) | RefPtr<ImageDecoder> ImageDecoder::try_create_for_raw_bytes(ReadonlyBytes bytes, Optional<DeprecatedString> mime_type) | ||||||
| { | { | ||||||
|     OwnPtr<ImageDecoderPlugin> plugin = probe_and_sniff_for_appropriate_plugin(bytes); |     if (OwnPtr<ImageDecoderPlugin> plugin = probe_and_sniff_for_appropriate_plugin(bytes); plugin) | ||||||
|     if (!plugin) { |         return adopt_ref_if_nonnull(new (nothrow) ImageDecoder(plugin.release_nonnull())); | ||||||
|         if (mime_type.has_value()) { | 
 | ||||||
|             plugin = probe_and_sniff_for_appropriate_plugin_with_known_mime_type(mime_type.value(), bytes); |     if (mime_type.has_value()) { | ||||||
|             if (!plugin) |         if (OwnPtr<ImageDecoderPlugin> plugin = probe_and_sniff_for_appropriate_plugin_with_known_mime_type(mime_type.value(), bytes); plugin) | ||||||
|                 return {}; |             return adopt_ref_if_nonnull(new (nothrow) ImageDecoder(plugin.release_nonnull())); | ||||||
|         } else { |  | ||||||
|             return {}; |  | ||||||
|         } |  | ||||||
|     } |     } | ||||||
|     return adopt_ref_if_nonnull(new (nothrow) ImageDecoder(plugin.release_nonnull())); | 
 | ||||||
|  |     return {}; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| ImageDecoder::ImageDecoder(NonnullOwnPtr<ImageDecoderPlugin> plugin) | ImageDecoder::ImageDecoder(NonnullOwnPtr<ImageDecoderPlugin> plugin) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Nico Weber
						Nico Weber