Skip to content

Commit f25ff29

Browse files
authored
Remove ordinal comparer passed into Dictionary (#5400)
1 parent b0f7b5e commit f25ff29

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Npgsql/NpgsqlParameterCollection.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ public override int IndexOf(string parameterName)
404404
void BuildLookup()
405405
{
406406
if (TwoPassCompatMode)
407-
_caseSensitiveLookup = new Dictionary<string, int>(InternalList.Count, StringComparer.Ordinal);
407+
_caseSensitiveLookup = new Dictionary<string, int>(InternalList.Count);
408408

409409
_caseInsensitiveLookup = new Dictionary<string, int>(InternalList.Count, StringComparer.OrdinalIgnoreCase);
410410

@@ -674,7 +674,7 @@ internal void CloneTo(NpgsqlParameterCollection other)
674674
if (TwoPassCompatMode)
675675
{
676676
Debug.Assert(_caseSensitiveLookup is not null);
677-
other._caseSensitiveLookup = new Dictionary<string, int>(_caseSensitiveLookup, StringComparer.Ordinal);
677+
other._caseSensitiveLookup = new Dictionary<string, int>(_caseSensitiveLookup);
678678
}
679679
}
680680
}

0 commit comments

Comments
 (0)