Browse Source

Fixed the FunctionToInstanceMethod pass.

pull/16/merge
triton 13 years ago
parent
commit
c13e843a3d
  1. 5
      src/Generator/Passes/FunctionToInstanceMethodPass.cs

5
src/Generator/Passes/FunctionToInstanceMethodPass.cs

@ -1,4 +1,5 @@
using System; using System;
using System.Linq;
using CppSharp.AST; using CppSharp.AST;
namespace CppSharp.Passes namespace CppSharp.Passes
@ -42,14 +43,14 @@ namespace CppSharp.Passes
// Create a new fake method so it acts as an instance method. // Create a new fake method so it acts as an instance method.
var method = new Method() var method = new Method()
{ {
Namespace = @class.Namespace, Namespace = @class,
Name = function.Name, Name = function.Name,
OriginalName = function.OriginalName, OriginalName = function.OriginalName,
Mangled = function.Mangled, Mangled = function.Mangled,
Access = AccessSpecifier.Public, Access = AccessSpecifier.Public,
Kind = CXXMethodKind.Normal, Kind = CXXMethodKind.Normal,
ReturnType = function.ReturnType, ReturnType = function.ReturnType,
Parameters = function.Parameters, Parameters = function.Parameters.Skip(1).ToList(),
CallingConvention = function.CallingConvention, CallingConvention = function.CallingConvention,
IsVariadic = function.IsVariadic, IsVariadic = function.IsVariadic,
IsInline = function.IsInline, IsInline = function.IsInline,

Loading…
Cancel
Save