Skip to content
This repository has been archived by the owner on Mar 11, 2021. It is now read-only.

Commit

Permalink
Use an explicit cast instead of "as" since there should always be a n…
Browse files Browse the repository at this point in the history
…amespace.
  • Loading branch information
tritao committed Jul 25, 2013
1 parent c13e843 commit 80c987a
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/Generator/Generators/CSharp/CSharpTextTemplate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1277,15 +1277,13 @@ public void GenerateFunctionCall(string functionName, List<Parameter> parameters

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)
isValueType = @class.IsValueType;
var @class = (Class) method.Namespace;
isValueType = @class.IsValueType;

needsInstance = !method.IsStatic;

Expand Down

0 comments on commit 80c987a

Please sign in to comment.