Browse Source

Use a cast instead of an 'as' check.

pull/355/head
triton 11 years ago
parent
commit
4dc6e84cc3
  1. 2
      src/Generator/Passes/CheckAbiParameters.cs

2
src/Generator/Passes/CheckAbiParameters.cs

@ -49,7 +49,7 @@ namespace CppSharp.Passes @@ -49,7 +49,7 @@ namespace CppSharp.Passes
if (function.HasThisReturn)
{
// This flag should only be true on methods.
var method = function as Method;
var method = (Method)function;
var classType = new QualifiedType(new TagType(method.Namespace),
new TypeQualifiers {IsConst = true});
function.ReturnType = new QualifiedType(new PointerType(classType));

Loading…
Cancel
Save