Skip to content

Commit

Permalink
Update Bytes.hx
Browse files Browse the repository at this point in the history
  • Loading branch information
SomeGuyWhoLovesCoding authored Sep 10, 2024
1 parent d93acf6 commit 4c444fe
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions std/hl/_std/haxe/io/Bytes.hx
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,8 @@ class Bytes {
return new haxe.io.BytesData(b, length);
}

public static function alloc(length:Int):Bytes {
public inline static function alloc(length:Int):Bytes {
var b = new hl.Bytes(length);
b.fill(0, length, 0);
return new Bytes(b, length);
}

Expand All @@ -226,7 +225,7 @@ class Bytes {
}
}

public static function ofData(b:BytesData):Bytes {
public inline static function ofData(b:BytesData):Bytes {
return new Bytes(b.bytes, b.length);
}

Expand Down

0 comments on commit 4c444fe

Please sign in to comment.