From 17041402c66d81f8d4e4f77a6b508e479a3849b1 Mon Sep 17 00:00:00 2001 From: James Jackson-South Date: Sat, 25 Feb 2023 20:59:36 +1000 Subject: [PATCH] Remove bad debug check and refs --- src/ImageSharp/Common/Helpers/Shuffle/IComponentShuffle.cs | 5 +---- src/ImageSharp/Common/Helpers/Shuffle/IPad3Shuffle4.cs | 5 +---- src/ImageSharp/Common/Helpers/Shuffle/IShuffle3.cs | 5 +---- src/ImageSharp/Common/Helpers/Shuffle/IShuffle4Slice3.cs | 5 +---- tests/ImageSharp.Benchmarks/Color/Bulk/Shuffle3Channel.cs | 2 -- .../Color/Bulk/Shuffle4Slice3Channel.cs | 2 -- 6 files changed, 4 insertions(+), 20 deletions(-) diff --git a/src/ImageSharp/Common/Helpers/Shuffle/IComponentShuffle.cs b/src/ImageSharp/Common/Helpers/Shuffle/IComponentShuffle.cs index 345f4b5c2e..9b73eb6ccf 100644 --- a/src/ImageSharp/Common/Helpers/Shuffle/IComponentShuffle.cs +++ b/src/ImageSharp/Common/Helpers/Shuffle/IComponentShuffle.cs @@ -47,10 +47,7 @@ internal interface IShuffle4 : IComponentShuffle internal readonly struct DefaultShuffle4 : IShuffle4 { public DefaultShuffle4(byte control) - { - DebugGuard.MustBeBetweenOrEqualTo(control, 0, 3, nameof(control)); - this.Control = control; - } + => this.Control = control; public byte Control { get; } diff --git a/src/ImageSharp/Common/Helpers/Shuffle/IPad3Shuffle4.cs b/src/ImageSharp/Common/Helpers/Shuffle/IPad3Shuffle4.cs index 348e8ec010..5dfdd91718 100644 --- a/src/ImageSharp/Common/Helpers/Shuffle/IPad3Shuffle4.cs +++ b/src/ImageSharp/Common/Helpers/Shuffle/IPad3Shuffle4.cs @@ -15,10 +15,7 @@ internal interface IPad3Shuffle4 : IComponentShuffle internal readonly struct DefaultPad3Shuffle4 : IPad3Shuffle4 { public DefaultPad3Shuffle4(byte control) - { - DebugGuard.MustBeBetweenOrEqualTo(control, 0, 3, nameof(control)); - this.Control = control; - } + => this.Control = control; public byte Control { get; } diff --git a/src/ImageSharp/Common/Helpers/Shuffle/IShuffle3.cs b/src/ImageSharp/Common/Helpers/Shuffle/IShuffle3.cs index 6ac8a2428a..6bf8c5f03d 100644 --- a/src/ImageSharp/Common/Helpers/Shuffle/IShuffle3.cs +++ b/src/ImageSharp/Common/Helpers/Shuffle/IShuffle3.cs @@ -15,10 +15,7 @@ internal interface IShuffle3 : IComponentShuffle internal readonly struct DefaultShuffle3 : IShuffle3 { public DefaultShuffle3(byte control) - { - DebugGuard.MustBeBetweenOrEqualTo(control, 0, 3, nameof(control)); - this.Control = control; - } + => this.Control = control; public byte Control { get; } diff --git a/src/ImageSharp/Common/Helpers/Shuffle/IShuffle4Slice3.cs b/src/ImageSharp/Common/Helpers/Shuffle/IShuffle4Slice3.cs index d4a5e8130a..ef46661f5f 100644 --- a/src/ImageSharp/Common/Helpers/Shuffle/IShuffle4Slice3.cs +++ b/src/ImageSharp/Common/Helpers/Shuffle/IShuffle4Slice3.cs @@ -15,10 +15,7 @@ internal interface IShuffle4Slice3 : IComponentShuffle internal readonly struct DefaultShuffle4Slice3 : IShuffle4Slice3 { public DefaultShuffle4Slice3(byte control) - { - DebugGuard.MustBeBetweenOrEqualTo(control, 0, 3, nameof(control)); - this.Control = control; - } + => this.Control = control; public byte Control { get; } diff --git a/tests/ImageSharp.Benchmarks/Color/Bulk/Shuffle3Channel.cs b/tests/ImageSharp.Benchmarks/Color/Bulk/Shuffle3Channel.cs index 9bd85f4743..fcde0ea1bd 100644 --- a/tests/ImageSharp.Benchmarks/Color/Bulk/Shuffle3Channel.cs +++ b/tests/ImageSharp.Benchmarks/Color/Bulk/Shuffle3Channel.cs @@ -1,9 +1,7 @@ // Copyright (c) Six Labors. // Licensed under the Six Labors Split License. -using System.Runtime.InteropServices; using BenchmarkDotNet.Attributes; -using Iced.Intel; namespace SixLabors.ImageSharp.Benchmarks.ColorSpaces.Bulk; diff --git a/tests/ImageSharp.Benchmarks/Color/Bulk/Shuffle4Slice3Channel.cs b/tests/ImageSharp.Benchmarks/Color/Bulk/Shuffle4Slice3Channel.cs index f0890221c8..ef01185f91 100644 --- a/tests/ImageSharp.Benchmarks/Color/Bulk/Shuffle4Slice3Channel.cs +++ b/tests/ImageSharp.Benchmarks/Color/Bulk/Shuffle4Slice3Channel.cs @@ -1,9 +1,7 @@ // Copyright (c) Six Labors. // Licensed under the Six Labors Split License. -using System.Runtime.InteropServices; using BenchmarkDotNet.Attributes; -using Iced.Intel; namespace SixLabors.ImageSharp.Benchmarks.ColorSpaces.Bulk;