Skip to content

Commit c50a812

Browse files
committed
fix warning
1 parent 7db06e5 commit c50a812

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

IDisposableAnalyzers/Analyzers/DisposeCallAnalyzer.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,7 @@ private static bool IsUsedAfter(ILocalSymbol local, InvocationExpressionSyntax i
110110
!IsAssigned(identifierName) &&
111111
!IsReassigned(identifierName))
112112
{
113-
if (temp is null)
114-
{
115-
temp = new List<Location>();
116-
}
117-
113+
temp ??= new List<Location>();
118114
temp.Add(identifierName.GetLocation());
119115
}
120116
}

0 commit comments

Comments
 (0)