C#: Reduce nesting and fix some formatting

This commit is contained in:
Tamas Vajk
2020-10-02 11:56:50 +02:00
parent e73ced2275
commit c38bf5ee5b
11 changed files with 125 additions and 111 deletions

View File

@@ -19,13 +19,11 @@ namespace Semmle.Extraction.CSharp.Populators
{
return l1;
}
else
{
var l2 = n2.FixedLocation();
int start = System.Math.Min(l1.SourceSpan.Start, l2.SourceSpan.Start);
int end = System.Math.Max(l1.SourceSpan.End, l2.SourceSpan.End);
return Location.Create(n2.SyntaxTree, new Microsoft.CodeAnalysis.Text.TextSpan(start, end - start));
}
var l2 = n2.FixedLocation();
int start = System.Math.Min(l1.SourceSpan.Start, l2.SourceSpan.Start);
int end = System.Math.Max(l1.SourceSpan.End, l2.SourceSpan.End);
return Location.Create(n2.SyntaxTree, new Microsoft.CodeAnalysis.Text.TextSpan(start, end - start));
}
/// <summary>