Permalink
Browse files

sanitized visitors (using IsNull property over internal classname check)

  • Loading branch information...
WolfgangSt committed Aug 31, 2011
1 parent d15da9b commit ea1b2a9b81fdf5d537f09ca7bf5934180f2d9b68
Showing with 2 additions and 2 deletions.
  1. +1 −1 IIS.SLSharp/Translation/GLSL/GlslVisitor.cs
  2. +1 −1 IIS.SLSharp/Translation/HLSL/HlslVisitor.cs
@@ -436,7 +436,7 @@ public override StringBuilder VisitIfElseStatement(IfElseStatement ifElseStateme
result.Append(Indent(trueSection, trueSection.AcceptVisitor(this, data)));
var elseSection = ifElseStatement.FalseStatement;
- if (elseSection.GetType().FullName != "ICSharpCode.NRefactory.CSharp.Statement+NullStatement")
+ if (!elseSection.IsNull)
{
result.Append(Environment.NewLine + "else");
result.Append(Indent(elseSection, elseSection.AcceptVisitor(this, data)));
@@ -480,7 +480,7 @@ public override StringBuilder VisitIfElseStatement(IfElseStatement ifElseStateme
result.Append(Indent(trueSection, trueSection.AcceptVisitor(this, data)));
var elseSection = ifElseStatement.FalseStatement;
- if (elseSection.GetType().FullName != "ICSharpCode.NRefactory.CSharp.Statement+NullStatement")
+ if (!elseSection.IsNull)
{
result.Append(Environment.NewLine + "else");
result.Append(Indent(elseSection, elseSection.AcceptVisitor(this, data)));

0 comments on commit ea1b2a9

Please sign in to comment.