Переглянути джерело

Remove unused null check in Bytes.getString (#12025)

limepoutine 6 місяців тому
батько
коміт
640f95978c
1 змінених файлів з 0 додано та 2 видалено
  1. 0 2
      std/haxe/io/Bytes.hx

+ 0 - 2
std/haxe/io/Bytes.hx

@@ -404,8 +404,6 @@ class Bytes {
 		interpreted with the given `encoding` (UTF-8 by default).
 		interpreted with the given `encoding` (UTF-8 by default).
 	**/
 	**/
 	public function getString(pos:Int, len:Int, ?encoding:Encoding):String {
 	public function getString(pos:Int, len:Int, ?encoding:Encoding):String {
-		if (encoding == null)
-			encoding == UTF8;
 		#if !neko
 		#if !neko
 		if (pos < 0 || len < 0 || pos + len > length)
 		if (pos < 0 || len < 0 || pos + len > length)
 			throw Error.OutsideBounds;
 			throw Error.OutsideBounds;