Permalink
Browse files

Removed unused parameters from the utility functions.

Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
  • Loading branch information...
ddobrev committed Jun 1, 2017
1 parent f954a07 commit 8479ed3735b0e88b9dd816993bf8a0f0028e711f
@@ -6,17 +6,17 @@ namespace CppSharp.AST
{
public static class ASTUtils
{
public static bool CheckIgnoreFunction(Function function, DriverOptions options)
public static bool CheckIgnoreFunction(Function function)
{
if (!function.IsGenerated) return true;
if (function is Method)
return CheckIgnoreMethod(function as Method, options);
return CheckIgnoreMethod(function as Method);
return false;
}
public static bool CheckIgnoreMethod(Method method, DriverOptions options)
public static bool CheckIgnoreMethod(Method method)
{
if (!method.IsGenerated) return true;
@@ -385,7 +385,7 @@ public void GenerateClassConstructors(Class @class, string nativeType)
foreach (var ctor in @class.Constructors)
{
if (ASTUtils.CheckIgnoreMethod(ctor, Options) || FunctionIgnored(ctor))
if (ASTUtils.CheckIgnoreMethod(ctor) || FunctionIgnored(ctor))
continue;
// C++/CLI does not allow special member funtions for value types.
@@ -517,7 +517,7 @@ public void GenerateClassMethods(List<Method> methods)
var staticMethods = new List<Method>();
foreach (var method in methods)
{
if (ASTUtils.CheckIgnoreMethod(method, Options) || FunctionIgnored(method))
if (ASTUtils.CheckIgnoreMethod(method) || FunctionIgnored(method))
continue;
if (method.IsConstructor)
@@ -710,7 +710,7 @@ public override void GenerateMethodSpecifier(Method method, Class @class)
public void GenerateMethod(Method method)
{
if (ASTUtils.CheckIgnoreMethod(method, Options) || FunctionIgnored(method)) return;
if (ASTUtils.CheckIgnoreMethod(method) || FunctionIgnored(method)) return;
PushBlock(BlockKind.Method, method);
GenerateDeclarationCommon(method);
@@ -210,7 +210,7 @@ private void GenerateClassMethods(Class @class, Class realOwner)
foreach (var method in @class.Methods.Where(m => @class == realOwner || !m.IsOperator))
{
if (ASTUtils.CheckIgnoreMethod(method, Options) || CLIHeaders.FunctionIgnored(method))
if (ASTUtils.CheckIgnoreMethod(method) || CLIHeaders.FunctionIgnored(method))
continue;
// C++/CLI does not allow special member funtions for value types.
@@ -385,7 +385,7 @@ private void GenerateInterface(Class @class)
WriteStartBraceIndent();
foreach (var method in @class.Methods.Where(m =>
!ASTUtils.CheckIgnoreMethod(m, Options) && m.Access == AccessSpecifier.Public))
!ASTUtils.CheckIgnoreMethod(m) && m.Access == AccessSpecifier.Public))
{
PushBlock(BlockKind.Method);
GenerateDeclarationCommon(method);
@@ -512,7 +512,7 @@ public void GenerateClassInternals(Class @class)
foreach (var method in @class.Methods)
{
if (ASTUtils.CheckIgnoreMethod(method, Options))
if (ASTUtils.CheckIgnoreMethod(method))
continue;
if (method.IsConstructor)
@@ -1129,7 +1129,7 @@ public void GenerateClassMethods(IList<Method> methods)
var staticMethods = new List<Method>();
foreach (var method in methods)
{
if (ASTUtils.CheckIgnoreMethod(method, Options))
if (ASTUtils.CheckIgnoreMethod(method))
continue;
if (method.IsConstructor)
@@ -1786,7 +1786,7 @@ public void GenerateClassConstructors(Class @class)
foreach (var ctor in @class.Constructors)
{
if (ASTUtils.CheckIgnoreMethod(ctor, Options))
if (ASTUtils.CheckIgnoreMethod(ctor))
continue;
GenerateMethod(ctor, @class);
@@ -126,7 +126,7 @@ public override bool VisitFunctionDecl(Function decl)
if (!VisitDeclaration(decl))
return false;
if (ASTUtils.CheckIgnoreFunction(decl, Options))
if (ASTUtils.CheckIgnoreFunction(decl))
return false;
CheckDuplicate(decl);
@@ -138,7 +138,7 @@ public override bool VisitMethodDecl(Method decl)
if (!VisitDeclaration(decl))
return false;
if (ASTUtils.CheckIgnoreMethod(decl, Options))
if (ASTUtils.CheckIgnoreMethod(decl))
return false;
if (decl.ExplicitInterfaceImpl == null)

0 comments on commit 8479ed3

Please sign in to comment.