mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 19:12:43 +00:00 
			
		
		
		
	LibTextCodec+Everywhere: Make TextCodec::decoder_for() take a StringView
We don't need a full String/DeprecatedString inside this function, so we might as well not force users to create one.
This commit is contained in:
		
							parent
							
								
									3c8bfa4662
								
							
						
					
					
						commit
						d6075ef5b5
					
				
					 14 changed files with 16 additions and 16 deletions
				
			
		|  | @ -877,7 +877,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | |||
|                 if (Utf8View { file_contents }.validate()) { | ||||
|                     builder.append(source); | ||||
|                 } else { | ||||
|                     auto* decoder = TextCodec::decoder_for("windows-1252"); | ||||
|                     auto* decoder = TextCodec::decoder_for("windows-1252"sv); | ||||
|                     VERIFY(decoder); | ||||
| 
 | ||||
|                     auto utf8_source = TextCodec::convert_input_to_utf8_using_given_decoder_unless_there_is_a_byte_order_mark(*decoder, source); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Sam Atkins
						Sam Atkins