Skip to content

Commit a403cf2

Browse files
committed
removed redundant cast
1 parent 4c7f0a9 commit a403cf2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

RetailCoder.VBE/Inspections/Inspector.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ public async Task<IEnumerable<ICodeInspectionResult>> FindIssuesAsync(Rubberduck
6464

6565
// Prepare ParseTreeWalker based inspections
6666
var parseTreeWalkResults = GetParseTreeResults(config, state);
67-
foreach (var parseTreeInspection in _inspections.Where(inspection => inspection.Severity != CodeInspectionSeverity.DoNotShow && inspection is IParseTreeInspection))
67+
foreach (var parseTreeInspection in _inspections.OfType<IParseTreeInspection>().Where(inspection => inspection.Severity != CodeInspectionSeverity.DoNotShow))
6868
{
69-
(parseTreeInspection as IParseTreeInspection).ParseTreeResults = parseTreeWalkResults;
69+
parseTreeInspection.ParseTreeResults = parseTreeWalkResults;
7070
}
7171

7272
var inspections = _inspections.Where(inspection => inspection.Severity != CodeInspectionSeverity.DoNotShow)

0 commit comments

Comments
 (0)