Browse Source

Use an explicit cast instead of "as" since there should always be a namespace.

pull/16/merge
triton 12 years ago
parent
commit
80c987a1e6
  1. 8
      src/Generator/Generators/CSharp/CSharpTextTemplate.cs

8
src/Generator/Generators/CSharp/CSharpTextTemplate.cs

@ -1277,14 +1277,12 @@ namespace CppSharp.Generators.CSharp @@ -1277,14 +1277,12 @@ namespace CppSharp.Generators.CSharp
var method = function as Method;
bool isValueType = false;
bool needsInstance = false;
var isValueType = false;
var needsInstance = false;
if (method != null)
{
var @class = method.Namespace as Class;
if (@class != null)
var @class = (Class) method.Namespace;
isValueType = @class.IsValueType;
needsInstance = !method.IsStatic;

Loading…
Cancel
Save