Skip to content

Commit d4beb48

Browse files
committed
Remove redundant flow control.
1 parent 8536cd2 commit d4beb48

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

Rubberduck.Parsing/Symbols/Declaration.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -639,11 +639,7 @@ public override int GetHashCode()
639639

640640
public void ClearReferences()
641641
{
642-
while (!_references.IsEmpty)
643-
{
644-
IdentifierReference reference;
645-
_references.TryTake(out reference);
646-
}
642+
_references = new ConcurrentBag<IdentifierReference>();
647643
}
648644
}
649645
}

Rubberduck.Parsing/VBA/RubberduckParserState.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -710,12 +710,7 @@ public void ClearBuiltInReferences()
710710
{
711711
continue;
712712
}
713-
714-
foreach (var reference in declaration.References)
715-
{
716-
declaration.ClearReferences();
717-
break;
718-
}
713+
declaration.ClearReferences();
719714
}
720715
}
721716

0 commit comments

Comments
 (0)