Skip to content

Commit

Permalink
Fix warnings about "type 'K' cannot be used as type parameter 'TKey' …
Browse files Browse the repository at this point in the history
…in the generic type or method 'Dictionary<TKey, TValue>'"
  • Loading branch information
BobLd committed Jan 19, 2025
1 parent c4576e4 commit 24b9a99
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/UglyToad.PdfPig/PdfFonts/Cmap/CMapUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static int ToInt(this ReadOnlySpan<byte> data)
return code;
}

public static void PutAll<TKey, TValue>(this Dictionary<TKey, TValue> target, IReadOnlyDictionary<TKey, TValue> source)
public static void PutAll<TKey, TValue>(this Dictionary<TKey, TValue> target, IReadOnlyDictionary<TKey, TValue> source) where TKey : notnull
{
foreach (var pair in source)
{
Expand Down
2 changes: 1 addition & 1 deletion src/UglyToad.PdfPig/Util/StackDictionary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace UglyToad.PdfPig.Util
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;

internal class StackDictionary<K, V>
internal class StackDictionary<K, V> where K : notnull
{
private readonly List<Dictionary<K, V>> values = new List<Dictionary<K, V>>();

Expand Down

0 comments on commit 24b9a99

Please sign in to comment.