Skip to content

Commit 803e499

Browse files
committed
Replace magic strings with nameof
1 parent c0cf832 commit 803e499

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

LibGit2Sharp.Shared/Core/GitOdbBackend.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ internal struct GitOdbBackend
88
{
99
static GitOdbBackend()
1010
{
11-
GCHandleOffset = Marshal.OffsetOf(typeof(GitOdbBackend), "GCHandle").ToInt32();
11+
GCHandleOffset = Marshal.OffsetOf(typeof(GitOdbBackend), nameof(GCHandle)).ToInt32();
1212
}
1313

1414
public uint Version;

LibGit2Sharp.Shared/Core/GitOdbBackendStream.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ internal class GitOdbBackendStream
1515
{
1616
static GitOdbBackendStream()
1717
{
18-
GCHandleOffset = Marshal.OffsetOf(typeof(GitOdbBackendStream), "GCHandle").ToInt32();
18+
GCHandleOffset = Marshal.OffsetOf(typeof(GitOdbBackendStream), nameof(GCHandle)).ToInt32();
1919
}
2020

2121
public IntPtr Backend;

LibGit2Sharp.Shared/Core/GitSmartSubtransport.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ internal class GitSmartSubtransport
88
{
99
static GitSmartSubtransport()
1010
{
11-
GCHandleOffset = Marshal.OffsetOf(typeof(GitSmartSubtransport), "GCHandle").ToInt32();
11+
GCHandleOffset = Marshal.OffsetOf(typeof(GitSmartSubtransport), nameof(GCHandle)).ToInt32();
1212
}
1313

1414
public action_callback Action;

LibGit2Sharp.Shared/Core/GitSmartSubtransportStream.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ internal class GitSmartSubtransportStream
88
{
99
static GitSmartSubtransportStream()
1010
{
11-
GCHandleOffset = Marshal.OffsetOf(typeof(GitSmartSubtransportStream), "GCHandle").ToInt32();
11+
GCHandleOffset = Marshal.OffsetOf(typeof(GitSmartSubtransportStream), nameof(GCHandle)).ToInt32();
1212
}
1313

1414
public IntPtr SmartTransport;

0 commit comments

Comments
 (0)