Skip to content

Commit 6bb9e6d

Browse files
committed
C#: Address review comments.
1 parent ab4e643 commit 6bb9e6d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

csharp/extractor/Semmle.Extraction.CSharp.Standalone/Runtime.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ private static Dictionary<string, RuntimeVersion> ParseRuntimes(IList<string> li
9292
var match = RuntimeRegex().Match(r);
9393
if (match.Success)
9494
{
95-
runtimes.AddOrUpdate(match.Groups[1].Value, new RuntimeVersion(match.Groups[6].Value, match.Groups[2].Value, match.Groups[4].Value, match.Groups[5].Value));
95+
runtimes.AddOrUpdateToLatest(match.Groups[1].Value, new RuntimeVersion(match.Groups[6].Value, match.Groups[2].Value, match.Groups[4].Value, match.Groups[5].Value));
9696
}
9797
});
9898

csharp/extractor/Semmle.Util/DictionaryExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ public static void AddAnother<T1, T2>(this Dictionary<T1, List<T2>> dict, T1 key
2222

2323
/// <summary>
2424
/// Adds a new value or replaces the existing value (if the new value is greater than the existing)
25-
/// in dictionary for the given key.
25+
/// in this dictionary for the given key.
2626
/// </summary>
27-
public static void AddOrUpdate<T1, T2>(this Dictionary<T1, T2> dict, T1 key, T2 value) where T1 : notnull where T2 : IComparable<T2>
27+
public static void AddOrUpdateToLatest<T1, T2>(this Dictionary<T1, T2> dict, T1 key, T2 value) where T1 : notnull where T2 : IComparable<T2>
2828
{
2929
if (!dict.TryGetValue(key, out var existing) || existing.CompareTo(value) < 0)
3030
{

0 commit comments

Comments
 (0)