10000 Dismiss a few other R# warnings · mm201/libgit2sharp@549a80c · GitHub
[go: up one dir, main page]

Skip to content

Commit 549a80c

Browse files
dahlbyknulltoken
authored andcommitted
Dismiss a few other R# warnings
1 parent 803a595 commit 549a80c

File tree

6 files changed

+7
-8
lines changed
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ internal class ExpectedFetchState
3939
/// Constructor.
4040
/// </summary>
4141
/// <param name="remoteName">Name of the remote being updated.</param>
42-
/// <param name="url">Url of the remote.</param>
4342
public ExpectedFetchState(string remoteName)
4443
{
4544
RemoteName = remoteName;
Original file line numberDiff line numberDiff line change
@@ -982,7 +982,7 @@ public static IntPtr git_odb_backend_malloc(IntPtr backend, UIntPtr len)
982982
{
983983
throw new LibGit2SharpException(String.Format(CultureInfo.InvariantCulture,
984984
"Unable to allocate {0} bytes; out of memory",
985-
len.ToString()),
985+
len),
986986
GitErrorCode.Error, GitErrorCategory.NoMemory);
987987
}
988988

Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ protected DirectReference()
1818
internal DirectReference(string canonicalName, Repository repo, ObjectId targetId)
1919
: base(canonicalName, targetId.Sha)
2020
{
21-
targetBuilder = new Lazy<GitObject>(() => repo.Lookup(targetId)); ;
21+
targetBuilder = new Lazy<GitObject>(() => repo.Lookup(targetId));
2222
}
2323

2424
/// <summary>
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public virtual Blob CreateBlob(string path)
7777
public virtual void AddBackend(OdbBackend backend, int priority)
7878
{
7979
Ensure.ArgumentNotNull(backend, "backend");
80-
Ensure.ArgumentConformsTo<int>(priority, s => s > 0, "priority");
80+
Ensure.ArgumentConformsTo(priority, s => s > 0, "priority");
8181

8282
Proxy.git_odb_add_backend(this.handle, backend.GitOdbBackendPointer, priority);
8383
}
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ private static unsafe int Write(
365365
OdbBackend odbBackend = GCHandle.FromIntPtr(Marshal.ReadIntPtr(backend, GitOdbBackend.GCHandleOffset)).Target as OdbBackend;
366366

367367
if (odbBackend != null &&
368-
len.ToUInt64() < (ulong)long.MaxValue)
368+
len.ToUInt64() < long.MaxValue)
369369
{
370370
try
371371
{
@@ -403,7 +403,7 @@ private static int WriteStream(
403403
OdbBackend odbBackend = GCHandle.FromIntPtr(Marshal.ReadIntPtr(backend, GitOdbBackend.GCHandleOffset)).Target as OdbBackend;
404404

405405
if (odbBackend != null &&
406-
length.ToUInt64() < (ulong)long.MaxValue)
406+
length.ToUInt64() < long.MaxValue)
407407
{
408408
OdbBackendStream stream;
409409

Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ private unsafe static int Read(
146146
OdbBackendStream odbBackendStream = GCHandle.FromIntPtr(Marshal.ReadIntPtr(stream, GitOdbBackendStream.GCHandleOffset)).Target as OdbBackendStream;
147147

148148
if (odbBackendStream != null &&
149-
len.ToUInt64() < (ulong)long.MaxValue)
149+
len.ToUInt64() < long.MaxValue)
150150
{
151151
using (UnmanagedMemoryStream memoryStream = new UnmanagedMemoryStream((byte*)buffer, 0, (long)len.ToUInt64(), FileAccess.ReadWrite))
152152
{
@@ -172,7 +172,7 @@ private static unsafe int Write(
172172
OdbBackendStream odbBackendStream = GCHandle.FromIntPtr(Marshal.ReadIntPtr(stream, GitOdbBackendStream.GCHandleOffset)).Target as OdbBackendStream;
173173

174174
if (odbBackendStream != null &&
175-
len.ToUInt64() < (ulong)long.MaxValue)
175+
len.ToUInt64() < long.MaxValue)
176176
{
177177
long length = (long)len.ToUInt64();
178178