From cbb4451284643d3829064d4ee7a345832cc206c6 Mon Sep 17 00:00:00 2001 From: triton Date: Sun, 26 Oct 2014 00:49:19 +0100 Subject: [PATCH] Small code cleanup. Non-functional change. --- src/Generator/Generators/CSharp/CSharpGenerator.cs | 2 +- src/Generator/Passes/CheckAbiParameters.cs | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/Generator/Generators/CSharp/CSharpGenerator.cs b/src/Generator/Generators/CSharp/CSharpGenerator.cs index 7b5d9350..2b492697 100644 --- a/src/Generator/Generators/CSharp/CSharpGenerator.cs +++ b/src/Generator/Generators/CSharp/CSharpGenerator.cs @@ -33,7 +33,7 @@ namespace CppSharp.Generators.CSharp // CheckAbiParameters runs last because hidden structure parameters // should always occur first. - Driver.AddTranslationUnitPass(new CheckAbiParameters(Driver.Options)); + Driver.AddTranslationUnitPass(new CheckAbiParameters()); return true; } diff --git a/src/Generator/Passes/CheckAbiParameters.cs b/src/Generator/Passes/CheckAbiParameters.cs index 642c9c02..1e1df6c0 100644 --- a/src/Generator/Passes/CheckAbiParameters.cs +++ b/src/Generator/Passes/CheckAbiParameters.cs @@ -20,13 +20,6 @@ namespace CppSharp.Passes /// public class CheckAbiParameters : TranslationUnitPass { - private readonly DriverOptions options; - - public CheckAbiParameters(DriverOptions options) - { - this.options = options; - } - public override bool VisitFunctionDecl(Function function) { if (!VisitDeclaration(function)) @@ -49,7 +42,7 @@ namespace CppSharp.Passes if (function.HasThisReturn) { // This flag should only be true on methods. - var method = (Method)function; + var method = (Method) function; var classType = new QualifiedType(new TagType(method.Namespace), new TypeQualifiers {IsConst = true}); function.ReturnType = new QualifiedType(new PointerType(classType));