Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions uSync.Core/Extensions/ConversionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ internal static class ConversionExtensions

public static Guid ConvertToGuid(this int value)
{
byte[] bytes = new byte[16];
BitConverter.GetBytes(value).CopyTo(bytes, 0);
Span<byte> bytes = stackalloc byte[16];
BitConverter.GetBytes(value).CopyTo(bytes);
return new Guid(bytes);
}
}
2 changes: 1 addition & 1 deletion uSync.Core/Extensions/StringExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public static string ToShortKeyString(this Guid guid, int length = 26)
// a Guid is 3 blocks + 8 bits

// so it turns into a 3*8+2 = 26 chars string
var chars = new char[length];
Span<char> chars = stackalloc char[length];

var i = 0;
var j = 0;
Expand Down