Skip to content

Commit 290906a

Browse files
committed
Fix CA1513
1 parent 98ffa0f commit 290906a

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/ImageSharp/Memory/Allocators/Internals/SharedArrayPoolBuffer{T}.cs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,7 @@ public void AddRef()
5757

5858
[Conditional("DEBUG")]
5959
[MemberNotNull(nameof(Array))]
60-
private void CheckDisposed()
61-
{
62-
#pragma warning disable CA1513
63-
if (this.Array == null)
64-
{
65-
throw new ObjectDisposedException("SharedArrayPoolBuffer");
66-
}
67-
#pragma warning restore CA1513
68-
}
60+
private void CheckDisposed() => ObjectDisposedException.ThrowIf(this.Array == null, this.Array);
6961

7062
private sealed class LifetimeGuard : RefCountedMemoryLifetimeGuard
7163
{

0 commit comments

Comments
 (0)