2
0
Эх сурвалжийг харах

inline get/set Float/Double in flash

Nicolas Cannasse 9 жил өмнө
parent
commit
8a159b2149

+ 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).
 		Returns the IEEE double precision value at given position (in low endian encoding).
 		Result is unspecified if reading outside of the bounds
 		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 {
 	public function getDouble( pos : Int ) : Float {
 		#if neko_v21
 		#if neko_v21
 		return untyped $sgetd(b, pos, false);
 		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).
 		Returns the IEEE single precision value at given position (in low endian encoding).
 		Result is unspecified if reading outside of the bounds
 		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 {
 	public function getFloat( pos : Int ) : Float {
 		#if neko_v21
 		#if neko_v21
 		return untyped $sgetf(b, pos, false);
 		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.
 		Store the IEEE double precision value at given position in low endian encoding.
 		Result is unspecified if writing outside of the bounds.
 		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 {
 	public function setDouble( pos : Int, v : Float ) : Void {
 		#if neko_v21
 		#if neko_v21
 		untyped $ssetd(b, pos, v, false);
 		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.
 		Store the IEEE single precision value at given position in low endian encoding.
 		Result is unspecified if writing outside of the bounds.
 		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 {
 	public function setFloat( pos : Int, v : Float ) : Void {
 		#if neko_v21
 		#if neko_v21
 		untyped $ssetf(b, pos, v, false);
 		untyped $ssetf(b, pos, v, false);