Skip to content

Commit

Permalink
Remove unnecessary unsafe keywords (#109231)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastienros authored Nov 2, 2024
1 parent a9ca413 commit c7190e3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1366,7 +1366,7 @@ public bool Overlaps(IEnumerable<T> other)
/// An earlier implementation used delegates to perform these checks rather than returning
/// an ElementCount struct; however this was changed due to the perf overhead of delegates.
/// </summary>
private unsafe ElementCount CheckUniqueAndUnfoundElements(IEnumerable<T> other, bool returnIfUnfound)
private ElementCount CheckUniqueAndUnfoundElements(IEnumerable<T> other, bool returnIfUnfound)
{
ElementCount result;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1570,7 +1570,7 @@ private void IntersectWithHashSetWithSameComparer(HashSet<T> other)
///
/// This attempts to allocate on the stack, if below StackAllocThreshold.
/// </summary>
private unsafe void IntersectWithEnumerable(IEnumerable<T> other)
private void IntersectWithEnumerable(IEnumerable<T> other)
{
Debug.Assert(_buckets != null, "_buckets shouldn't be null; callers should check first");

Expand Down Expand Up @@ -1642,7 +1642,7 @@ private void SymmetricExceptWithUniqueHashSet(HashSet<T> other)
///
/// </summary>
/// <param name="other"></param>
private unsafe void SymmetricExceptWithEnumerable(IEnumerable<T> other)
private void SymmetricExceptWithEnumerable(IEnumerable<T> other)
{
int originalCount = _count;
int intArrayLength = BitHelper.ToIntArrayLength(originalCount);
Expand Down

0 comments on commit c7190e3

Please sign in to comment.