Sfoglia il codice sorgente

[python] remove return from some Void methods because the analyzer complains

Simon Krajewski 11 anni fa
parent
commit
eb467870cd
2 ha cambiato i file con 5 aggiunte e 5 eliminazioni
  1. 4 4
      std/python/_std/Array.hx
  2. 1 1
      std/python/internal/ArrayImpl.hx

+ 4 - 4
std/python/_std/Array.hx

@@ -50,7 +50,7 @@ extern class Array<T> implements ArrayAccess<T> extends ArrayImpl {
 	}
 
 	public inline function insert( pos : Int, x : T ) : Void {
-		return ArrayImpl.insert(this, pos, x);
+		ArrayImpl.insert(this, pos, x);
 	}
 
 
@@ -71,7 +71,7 @@ extern class Array<T> implements ArrayAccess<T> extends ArrayImpl {
 	}
 
 	public inline function unshift(x : T) : Void {
-		return ArrayImpl.unshift(this,x);
+		ArrayImpl.unshift(this,x);
 	}
 
 	public inline function indexOf(x : T, ?fromIndex:Int) : Int {
@@ -88,7 +88,7 @@ extern class Array<T> implements ArrayAccess<T> extends ArrayImpl {
 	}
 
 	public inline function reverse() : Void {
-		return ArrayImpl.reverse(this);
+		ArrayImpl.reverse(this);
 	}
 
 	@:runtime public inline function shift() : Null<T> {
@@ -100,7 +100,7 @@ extern class Array<T> implements ArrayAccess<T> extends ArrayImpl {
 	}
 
 	public inline function sort(f:T->T->Int) : Void {
-		return ArrayImpl.sort(this, f);
+		ArrayImpl.sort(this, f);
 	}
 
 	public inline function splice( pos : Int, len : Int ) : Array<T> {

+ 1 - 1
std/python/internal/ArrayImpl.hx

@@ -88,7 +88,7 @@ class ArrayImpl {
 	}
 
 	public static inline function unshift<T>(x:Array<T>,e : T) : Void {
-		return x.insert(0,e);
+		x.insert(0,e);
 	}
 
 	public static function remove<T>(x:Array<T>,e : T) : Bool {