ソースを参照

remove some unused code

Simon Krajewski 11 年 前
コミット
88e6717d74

+ 0 - 1
std/cpp/_std/Date.hx

@@ -78,7 +78,6 @@
 			default:
 				throw "Invalid date format : " + s;
 		}
-		return null;
 	}
 }
 

+ 0 - 1
std/cs/internal/Function.hx

@@ -40,7 +40,6 @@ package cs.internal;
 	public function __hx_invokeDynamic(dynArgs:Array<Dynamic>):Dynamic
 	{
 		throw "Abstract implementation";
-		return null;
 	}
 }
 

+ 0 - 2
std/cs/internal/Runtime.hx

@@ -397,7 +397,6 @@ import cs.system.Object;
 	{
 		//not implemented yet;
 		throw "Not implemented";
-		return null;
 	}
 
 	public static function callMethod(obj:Dynamic, methods:NativeArray<MethodBase>, methodLength:Int, args:Array<Dynamic>):Dynamic
@@ -587,7 +586,6 @@ import cs.system.Object;
 	public static function slowCallField(obj:Dynamic, field:String, args:Array<Dynamic>):Dynamic
 	{
 		throw "not implemented";
-		return null;
 	}
 
 	@:functionCode('

+ 0 - 1
std/flash/_std/Xml.hx

@@ -114,7 +114,6 @@ extern enum XmlType {
 		default :
 			throw "unimplemented node type: " + node.nodeType;
 		}
-		return null;
 	}
 
 	private function get_nodeName() : String {

+ 0 - 1
std/haxe/Resource.hx

@@ -158,7 +158,6 @@ class Resource {
         #else
         return Bytes.ofData(content.get(name,null));
         #end
-		return null;
 		#else
 		for( x in content )
 			if( x.name == name ) {

+ 0 - 2
std/haxe/Utf8.hx

@@ -63,7 +63,6 @@ class Utf8 {
 	**/
 	public static function encode( s : String ) : String {
 		throw "Not implemented";
-		return s;
 	}
 
 	/**
@@ -72,7 +71,6 @@ class Utf8 {
 	**/
 	public static function decode( s : String ) : String {
 		throw "Not implemented";
-		return s;
 	}
 
 	/**

+ 0 - 1
std/haxe/io/Input.hx

@@ -46,7 +46,6 @@ class Input {
 	public function readByte() : Int {
 	#if cpp
 		throw "Not implemented";
-		return 0;
 	#else
 		return throw "Not implemented";
 	#end

+ 0 - 1
std/java/_std/sys/FileSystem.hx

@@ -65,7 +65,6 @@ class FileSystem {
 			return new File(relPath).getCanonicalPath();
 		} catch (e: java.io.IOException) {
 			throw new java.lang.RuntimeException(e);
-			return null;
 		}
 	}
 

+ 0 - 1
std/java/db/Jdbc.hx

@@ -307,7 +307,6 @@ private class JdbcResultSet implements sys.db.ResultSet
     {
   		return rs.getString(n);
     } catch(e:Dynamic) throw e;
-    return null;
 	}
 
 	public function getIntResult( n : Int ) : Int

+ 0 - 1
std/java/internal/Function.hx

@@ -42,7 +42,6 @@ import java.internal.Runtime;
 	public function __hx_invokeDynamic(dynArgs:Array<Dynamic>):Dynamic
 	{
 		throw "Abstract implementation";
-		return null;
 	}
 }
 

+ 3 - 4
std/python/_std/EReg.hx

@@ -155,14 +155,13 @@ class EReg {
 				lastEnd = x.end();
 			}
 			ret.push(s.substr(lastEnd));
-			return ret;
+			ret;
 		} else {
 			this.match(s);
 			if (matchObj == null) {
-
-				return [s];
+				[s];
 			} else {
-				return [ s.substring(0, matchObj.start()), s.substr(matchObj.end()) ];
+				[ s.substring(0, matchObj.start()), s.substr(matchObj.end()) ];
 			}
 
 		}

+ 7 - 7
std/python/_std/Type.hx

@@ -1,9 +1,3 @@
-import python.internal.AnonObject;
-import python.internal.EnumImpl;
-import python.internal.Internal;
-import python.lib.Builtin;
-import python.Syntax;
-
 /*
  * Copyright (C)2005-2012 Haxe Foundation
  *
@@ -25,6 +19,13 @@ import python.Syntax;
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  * DEALINGS IN THE SOFTWARE.
  */
+
+import python.internal.AnonObject;
+import python.internal.EnumImpl;
+import python.internal.Internal;
+import python.lib.Builtin;
+import python.Syntax;
+
 enum ValueType {
 	TNull;
 	TInt;
@@ -137,7 +138,6 @@ enum ValueType {
 			default:
 				throw "Too many arguments";
 		}
-		return null;
 	}
 
 	public static function createEmptyInstance<T>( cl : Class<T> ) : T

+ 0 - 1
tests/unit/issues/Issue2907.hx

@@ -14,7 +14,6 @@ class Issue2907 extends Test {
 		} catch(e:Dynamic) {
 			return null;
 		}
-		return null;
 	}
 
 	function test<T>() {