소스 검색

fix compat.Uint8Array.set (#7130)

R32 7 년 전
부모
커밋
91afdfba23
3개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 1
      std/js/html/compat/Float32Array.hx
  2. 1 1
      std/js/html/compat/Float64Array.hx
  3. 1 1
      std/js/html/compat/Uint8Array.hx

+ 1 - 1
std/js/html/compat/Float32Array.hx

@@ -80,7 +80,7 @@ class Float32Array {
 		return arr;
 	}
 
-	static function _set( ?arg : Dynamic, ?offset : Int ) {
+	static function _set( ?arg : Dynamic, offset = 0 ) {
 		if( Std.is(arg.buffer,ArrayBuffer) ) {
 			var a : Array<Int> = arg;
 			if( arg.byteLength + offset > nativeThis.byteLength )

+ 1 - 1
std/js/html/compat/Float64Array.hx

@@ -87,7 +87,7 @@ class Float64Array {
 		return arr;
 	}
 
-	static function _set( ?arg : Dynamic, ?offset : Int ) {
+	static function _set( ?arg : Dynamic, offset = 0 ) {
 		if( Std.is(arg.buffer,ArrayBuffer) ) {
 			var a : Array<Int> = arg;
 			if( arg.byteLength + offset > nativeThis.byteLength )

+ 1 - 1
std/js/html/compat/Uint8Array.hx

@@ -71,7 +71,7 @@ class Uint8Array {
 		return arr;
 	}
 
-	static function _set( ?arg : Dynamic, ?offset : Int ) {
+	static function _set( ?arg : Dynamic, offset = 0 ) {
 		if( Std.is(arg.buffer,ArrayBuffer) ) {
 			var a : Array<Int> = arg;
 			if( arg.byteLength + offset > nativeThis.byteLength )