浏览代码

inline get/set Float/Double in flash

Nicolas Cannasse 9 年之前
父节点
当前提交
8a159b2149
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4 4
      std/haxe/io/Bytes.hx

+ 4 - 4
std/haxe/io/Bytes.hx

@@ -209,7 +209,7 @@ class Bytes {
 		Returns the IEEE double precision value at given position (in low endian encoding).
 		Result is unspecified if reading outside of the bounds
 	**/
-	#if (neko_v21 || (cpp && !cppia)) inline #end
+	#if (neko_v21 || (cpp && !cppia) || flash) inline #end
 	public function getDouble( pos : Int ) : Float {
 		#if neko_v21
 		return untyped $sgetd(b, pos, false);
@@ -228,7 +228,7 @@ class Bytes {
 		Returns the IEEE single precision value at given position (in low endian encoding).
 		Result is unspecified if reading outside of the bounds
 	**/
-	#if (neko_v21 || (cpp && !cppia)) inline #end
+	#if (neko_v21 || (cpp && !cppia) || flash) inline #end
 	public function getFloat( pos : Int ) : Float {
 		#if neko_v21
 		return untyped $sgetf(b, pos, false);
@@ -248,7 +248,7 @@ class Bytes {
 		Store the IEEE double precision value at given position in low endian encoding.
 		Result is unspecified if writing outside of the bounds.
 	**/
-	#if neko_v21 inline #end
+	#if (neko_v21 || flash) inline #end
 	public function setDouble( pos : Int, v : Float ) : Void {
 		#if neko_v21
 		untyped $ssetd(b, pos, v, false);
@@ -271,7 +271,7 @@ class Bytes {
 		Store the IEEE single precision value at given position in low endian encoding.
 		Result is unspecified if writing outside of the bounds.
 	**/
-	#if neko_v21 inline #end
+	#if (neko_v21 || flash) inline #end
 	public function setFloat( pos : Int, v : Float ) : Void {
 		#if neko_v21
 		untyped $ssetf(b, pos, v, false);