Skip to content

Commit

Permalink
Merge pull request #16 from techno-dwarf-works/feature/refactoring
Browse files Browse the repository at this point in the history
Version to 0.0.13
  • Loading branch information
OpOpYaDev committed Jul 6, 2024
1 parent 4a3b866 commit 3274bdc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion Runtime/DataStructures/SerializedTypes/SerializedDictionary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class SerializedDictionary<TKey, TValue> : IDictionary<TKey, TValue>, ISe
[SerializeField] private List<TKey> _keys; // Serialized list of keys
[SerializeField] private List<TValue> _values; // Serialized list of values

private Dictionary<TKey, TValue> _dictionary = new(); // The underlying dictionary
private Dictionary<TKey, TValue> _dictionary;

/// <summary>
/// Gets or sets the value associated with the specified key.
Expand Down Expand Up @@ -81,6 +81,15 @@ public TKey this[TValue value]
}
}

public SerializedDictionary(IEqualityComparer<TKey> comparer)
{
_dictionary = new(comparer);
}

public SerializedDictionary() : this(EqualityComparer<TKey>.Default)
{
}

/// <summary>
/// Adds the specified key and value to the dictionary.
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.tdw.better.commons",
"displayName": "Better Commons",
"version": "0.0.12",
"version": "0.0.13",
"unity": "2021.3",
"description": " ",
"dependencies": {
Expand Down

0 comments on commit 3274bdc

Please sign in to comment.