10000 Fix Non-CLS compliant code · dotjosh/libgit2sharp@5e546fc · GitHub
[go: up one dir, main page]

Skip to content

Commit 5e546fc

Browse files
committed
Fix Non-CLS compliant code
1 parent b8f4640 commit 5e546fc

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

LibGit2Sharp/Commit.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,13 @@ public IEnumerable<Commit> Parents
9292
/// <summary>
9393
/// Gets The count of parent commits.
9494
/// </summary>
95-
public uint ParentsCount
95+
public int ParentsCount
9696
{
9797
get
9898
{
9999
using (var obj = new ObjectSafeWrapper(Id, repo))
100100
{
101-
return NativeMethods.git_commit_parentcount(obj.ObjectPtr);
101+
return (int)NativeMethods.git_commit_parentcount(obj.ObjectPtr);
102102
}
103103
}
104104
}

LibGit2Sharp/Index.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ private void RestorePotentialPreviousVersionOfHeadIntoIndex(string relativePath)
444444

445445
var indexEntry = new GitIndexEntry
446446
{
447-
Mode = treeEntry.Attributes,
447+
Mode = (uint)treeEntry.Attributes,
448448
oid = treeEntry.Target.Id.Oid,
449449
Path = utf8Marshaler.MarshalManagedToNative(relativePath),
450450
};

LibGit2Sharp/TreeEntry.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ internal TreeEntry(IntPtr obj, ObjectId parentTreeId, Repository repo)
2727
Type = NativeMethods.git_tree_entry_type(obj);
2828
target = new Lazy<GitObject>(RetreiveTreeEntryTarget);
2929

30-
Attributes = NativeMethods.git_tree_entry_attributes(obj);
30+
Attributes = (int)NativeMethods.git_tree_entry_attributes(obj);
3131
Name = NativeMethods.git_tree_entry_name(obj).MarshallAsString();
3232
}
3333

3434
/// <summary>
3535
/// Gets the UNIX file attributes.
3636
/// </summary>
37-
public uint Attributes { get; private set; }
37+
public int Attributes { get; private set; }
3838

3939
/// <summary>
4040
/// Gets the filename.

0 commit comments

Comments
 (0)
0