Skip to content

Commit d0f8620

Browse files
committed
Use var
1 parent 8a96550 commit d0f8620

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

DuckDB.NET.Data/Extensions/GuidConverter.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public static unsafe Guid ConvertToGuid(this DuckDBHugeInt input)
3232
#endif
3333

3434
// Reconstruct the Guid bytes (reverse the original byte reordering)
35-
for (int i = 0; i < GuidSize; i++)
35+
for (var i = 0; i < GuidSize; i++)
3636
{
3737
bytes[GuidByteOrder[i]] = bytes[i + GuidSize];
3838
}
@@ -59,22 +59,22 @@ public static DuckDBHugeInt ToHugeInt(this Guid guid)
5959
#endif
6060

6161
// Reconstruct the Guid bytes (reverse the original byte reordering)
62-
for (int i = 0; i < GuidSize; i++)
62+
for (var i = 0; i < GuidSize; i++)
6363
{
6464
bytes[i + GuidSize] = bytes[GuidByteOrder[i]];
6565
}
6666

6767
#if NET6_0_OR_GREATER
6868
// Upper 64 bits (bytes 0-7)
69-
long upper = BitConverter.ToInt64(bytes[GuidSize..]);
69+
var upper = BitConverter.ToInt64(bytes[GuidSize..]);
7070

7171
// Lower 64 bits (bytes 8-15)
72-
ulong lower = BitConverter.ToUInt64(bytes[(GuidSize + 8)..]);
72+
var lower = BitConverter.ToUInt64(bytes[(GuidSize + 8)..]);
7373
#else
7474
var array = bytes.ToArray();
7575

76-
long upper = BitConverter.ToInt64(array, GuidSize);
77-
ulong lower = BitConverter.ToUInt64(array, GuidSize + 8);
76+
var upper = BitConverter.ToInt64(array, GuidSize);
77+
var lower = BitConverter.ToUInt64(array, GuidSize + 8);
7878
#endif
7979

8080
// Flip the first bit to make `order by uuid` same as `order by uuid::varchar`

0 commit comments

Comments
 (0)