Browse Source

Fixed SetMethodParameterUsage to use complete class declarations.

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

4
src/Generator/Library.cs

@ -257,8 +257,7 @@ 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");
@ -267,7 +266,6 @@ namespace CppSharp
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,
string destination) string destination)

Loading…
Cancel
Save