Browse Source

Remove redundant code in TypeConverter

this code does literally nothing, but reduces the performance greatly
h15ter 11 years ago
parent
commit
4ee7a6dacd
1 changed files with 1 additions and 23 deletions
  1. 1 23
      Jint/Runtime/TypeConverter.cs

+ 1 - 23
Jint/Runtime/TypeConverter.cs

@@ -380,30 +380,8 @@ namespace Jint.Runtime
                 }
             }
 
-            var candidates = new List<MethodBase>();
             foreach (var method in methods)
-            {
-                var parameters = new object[arguments.Length];
-                try
-                {
-                    for (var i = 0; i < arguments.Length; i++)
-                    {
-                        parameters[i] = engine.Options.GetTypeConverter().Convert(
-                            arguments[i].ToObject(),
-                            method.GetParameters()[i].ParameterType,
-                            CultureInfo.InvariantCulture);
-                    }
-                }
-                catch
-                {
-                    // ignore method
-                }
-
-                candidates.Add(method);
-            }
-
-            foreach (var candidate in candidates)
-                yield return candidate;
+                yield return method;
         }
 
     }