Browse Source

Fixed SetMethodParameterUsage to use complete class declarations.

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

16
src/Generator/Library.cs

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

Loading…
Cancel
Save