Skip to content

Commit

Permalink
improve svelto dictionary and fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastiano Mandala committed Mar 18, 2023
1 parent f1479ab commit 0c123ed
Show file tree
Hide file tree
Showing 7 changed files with 173 additions and 185 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/nuget-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
run: unzip temp/bin/debug/Svelto.Common.${{ env.PKG_VERSION }}.nupkg -d temp/bin/debug

- name: copy debug DLL to temp folder
run: sudo cp temp/bin/debug/lib/netstandard2.1/Svelto.Common.dll temp/bin/debug
run: sudo cp temp/bin/debug/lib/netstandard2.0/Svelto.Common.dll temp/bin/debug

# Build for release
- name: create package for Release configuration
Expand All @@ -50,7 +50,7 @@ jobs:
run: unzip temp/bin/release/Svelto.Common.${{ env.PKG_VERSION }}.nupkg -d temp/bin/release

- name: copy release DLL to temp folder
run: sudo cp temp/bin/release/lib/netstandard2.1/Svelto.Common.dll temp/bin/release
run: sudo cp temp/bin/release/lib/netstandard2.0/Svelto.Common.dll temp/bin/release

# Compile into nuget package
- name: build nuget package
Expand Down
2 changes: 2 additions & 0 deletions DataStructures/Dictionaries/FasterDictionary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ public FasterDictionaryDebugProxy(FasterDictionary<TKey, TValue> dic)
{
this._dic = dic;
}

public uint count => (uint)_dic.count;

[DebuggerBrowsable(DebuggerBrowsableState.RootHidden)]
public KeyValuePairFast<TKey, TValue, ManagedStrategy<TValue>>[] keyValues
Expand Down
341 changes: 165 additions & 176 deletions DataStructures/Dictionaries/SveltoDictionary.cs

Large diffs are not rendered by default.

5 changes: 1 addition & 4 deletions DataStructures/Dictionaries/SveltoDictionaryNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,22 @@ namespace Svelto.DataStructures
{
public struct SveltoDictionaryNode<TKey>
{
public TKey key;
internal int hashcode;
internal int previous;
internal int next;
public TKey key;

public SveltoDictionaryNode(ref TKey key, int hash, int previousNode)
{
this.key = key;
hashcode = hash;
previous = previousNode;
next = -1;
}

public SveltoDictionaryNode(ref TKey key, int hash)
{
this.key = key;
hashcode = hash;
previous = -1;
next = -1;
}
}
}
2 changes: 1 addition & 1 deletion Utilities/UnmanagedTypeExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace Svelto.Common.Internal
{
internal static class UnmanagedTypeExtensions
static class UnmanagedTypeExtensions
{
//System.Runtime.CompilerServices.RuntimeHelpers.IsReferenceOrContainsReferences<T> doesn't exist in dotnet
//it's something just for mono!
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"svelto"
],
"name": "com.sebaslab.svelto.common",
"version": "3.4.0",
"version": "3.4.1",
"type": "library",
"unity": "2019.3"
}
2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "3.4.0"
"version": "3.4.1"
}

0 comments on commit 0c123ed

Please sign in to comment.