Skip to content

Commit 5cf8f60

Browse files
Push the right fix!
1 parent d9126ea commit 5cf8f60

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/ImageSharp/Common/Helpers/Vector128Utilities.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,7 @@ public static Vector128<byte> ShiftRightBytesInVector(Vector128<byte> value, [Co
111111
{
112112
if (Sse2.IsSupported)
113113
{
114-
#pragma warning disable CA1857 // A constant is expected for the parameter
115-
return Sse2.ShiftRightLogical128BitLane(value, (byte)(16 - numBytes));
116-
#pragma warning restore CA1857 // A constant is expected for the parameter
114+
return Sse2.ShiftRightLogical128BitLane(value, numBytes);
117115
}
118116

119117
if (AdvSimd.IsSupported)
@@ -141,7 +139,9 @@ public static Vector128<byte> ShiftLeftBytesInVector(Vector128<byte> value, [Con
141139

142140
if (AdvSimd.IsSupported)
143141
{
144-
return AdvSimd.ExtractVector128(Vector128<byte>.Zero, value, numBytes);
142+
#pragma warning disable CA1857 // A constant is expected for the parameter
143+
return AdvSimd.ExtractVector128(Vector128<byte>.Zero, value, (byte)(16 - numBytes));
144+
#pragma warning restore CA1857 // A constant is expected for the parameter
145145
}
146146

147147
ThrowUnreachableException();

0 commit comments

Comments
 (0)