File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -61,9 +61,7 @@ public static BlameSafeHandle git_blame_file(
61
61
62
62
public static GitBlameHunk git_blame_get_hunk_byindex ( BlameSafeHandle blame , uint idx )
63
63
{
64
- GitBlameHunk hunk = new GitBlameHunk ( ) ;
65
- Marshal . PtrToStructure ( NativeMethods . git_blame_get_hunk_byindex ( blame , idx ) , hunk ) ;
66
- return hunk ;
64
+ return MarshalAs < GitBlameHunk > ( NativeMethods . git_blame_get_hunk_byindex ( blame , idx ) ) ;
67
65
}
68
66
69
67
public static void git_blame_free ( IntPtr blame )
@@ -2798,7 +2796,7 @@ public static IList<GitRemoteHead> RemoteLsHelper(IntPtr heads, UIntPtr size)
2798
2796
var list = new List < GitRemoteHead > ( count ) ;
2799
2797
for ( int i = 0 ; i < count ; i ++ )
2800
2798
{
2801
- list . Add ( ( GitRemoteHead ) Marshal . PtrToStructure ( rawHeads [ i ] , typeof ( GitRemoteHead ) ) ) ;
2799
+ list . Add ( MarshalAs < GitRemoteHead > ( rawHeads [ i ] ) ) ;
2802
2800
}
2803
2801
return list ;
2804
2802
}
You can’t perform that action at this time.
0 commit comments