Browse Source

inline get/set Float/Double in flash

Nicolas Cannasse 9 years ago
parent
commit
8a159b2149
1 changed files with 4 additions and 4 deletions
  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);