Browse Source

Fixed SetMethodParameterUsage to use complete class declarations.

pull/526/head
triton 10 years ago
parent
commit
5ef03e1269
  1. 16
      src/Generator/Library.cs

16
src/Generator/Library.cs

@ -257,16 +257,14 @@ namespace CppSharp @@ -257,16 +257,14 @@ namespace CppSharp
if (parameterIndex <= 0 )
throw new ArgumentException("parameterIndex");
foreach (var @class in context.FindClass(className))
{
var method = @class.Methods.Find(m => m.Name == methodName);
if (method == null)
throw new ArgumentException("methodName");
if (method.Parameters.Count < parameterIndex)
throw new ArgumentException("parameterIndex");
var @class = context.FindCompleteClass(className);
var method = @class.Methods.Find(m => m.Name == methodName);
if (method == null)
throw new ArgumentException("methodName");
if (method.Parameters.Count < parameterIndex)
throw new ArgumentException("parameterIndex");
method.Parameters[parameterIndex - 1].Usage = usage;
}
method.Parameters[parameterIndex - 1].Usage = usage;
}
public static void CopyClassFields(this ASTContext context, string source,

Loading…
Cancel
Save