From c13e843a3d40b1a6026a5bd40279bdef816371a1 Mon Sep 17 00:00:00 2001 From: triton Date: Thu, 25 Jul 2013 01:03:13 +0100 Subject: [PATCH] Fixed the FunctionToInstanceMethod pass. --- src/Generator/Passes/FunctionToInstanceMethodPass.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Generator/Passes/FunctionToInstanceMethodPass.cs b/src/Generator/Passes/FunctionToInstanceMethodPass.cs index 23231fdc..3b48a1e2 100644 --- a/src/Generator/Passes/FunctionToInstanceMethodPass.cs +++ b/src/Generator/Passes/FunctionToInstanceMethodPass.cs @@ -1,4 +1,5 @@ using System; +using System.Linq; using CppSharp.AST; namespace CppSharp.Passes @@ -42,14 +43,14 @@ namespace CppSharp.Passes // Create a new fake method so it acts as an instance method. var method = new Method() { - Namespace = @class.Namespace, + Namespace = @class, Name = function.Name, OriginalName = function.OriginalName, Mangled = function.Mangled, Access = AccessSpecifier.Public, Kind = CXXMethodKind.Normal, ReturnType = function.ReturnType, - Parameters = function.Parameters, + Parameters = function.Parameters.Skip(1).ToList(), CallingConvention = function.CallingConvention, IsVariadic = function.IsVariadic, IsInline = function.IsInline,