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. 10
      src/Generator/Generators/CSharp/CSharpTextTemplate.cs

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

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

Loading…
Cancel
Save