瀏覽代碼

[cs] minor canSeek cleanup (similar to python one)

Dan Korostelev 9 年之前
父節點
當前提交
602d5d80df
共有 2 個文件被更改,包括 5 次插入4 次删除
  1. 2 2
      std/cs/io/NativeInput.hx
  2. 3 2
      std/cs/io/NativeOutput.hx

+ 2 - 2
std/cs/io/NativeInput.hx

@@ -28,7 +28,7 @@ import haxe.io.Input;
 
 class NativeInput extends Input
 {
-	public var canSeek(get_canSeek, null):Bool;
+	public var canSeek(get,never):Bool;
 
 	var stream:cs.system.io.Stream;
 	var _eof:Bool;
@@ -67,7 +67,7 @@ class NativeInput extends Input
 		stream.Close();
 	}
 
-	private function get_canSeek():Bool
+	private inline function get_canSeek():Bool
 	{
 		return stream.CanSeek;
 	}

+ 3 - 2
std/cs/io/NativeOutput.hx

@@ -26,7 +26,8 @@ import haxe.io.Output;
 
 class NativeOutput extends Output
 {
-	var canSeek(get_canSeek, null):Bool;
+	var canSeek(get,never):Bool;
+
 	var stream:cs.system.io.Stream;
 	public function new(stream)
 	{
@@ -55,7 +56,7 @@ class NativeOutput extends Output
 		stream.SetLength(haxe.Int64.add(stream.Length, cast(nbytes, Int64)));
 	}
 
-	private function get_canSeek():Bool
+	private inline function get_canSeek():Bool
 	{
 		return stream.CanSeek;
 	}