From 0154e4ec8e59b344b72db1d4680cbdec2778bb16 Mon Sep 17 00:00:00 2001 From: Brian Popow Date: Wed, 30 Mar 2022 13:25:43 +0200 Subject: [PATCH] Fix build issue --- .../Jpeg/Components/Decoder/ArithmeticScanDecoder.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ImageSharp/Formats/Jpeg/Components/Decoder/ArithmeticScanDecoder.cs b/src/ImageSharp/Formats/Jpeg/Components/Decoder/ArithmeticScanDecoder.cs index 9c80cdada0..e653e505ea 100644 --- a/src/ImageSharp/Formats/Jpeg/Components/Decoder/ArithmeticScanDecoder.cs +++ b/src/ImageSharp/Formats/Jpeg/Components/Decoder/ArithmeticScanDecoder.cs @@ -57,9 +57,6 @@ namespace SixLabors.ImageSharp.Formats.Jpeg.Components.Decoder private readonly CancellationToken cancellationToken; - // Uses C# compiler's optimization to refer to static data segement directly, without any further allocation. - private static ReadOnlySpan FixedBin => new byte[] { 113, 0, 0, 0 }; - private static readonly int[] ArithmeticTable = { Pack(0x5a1d, 1, 1, 1), @@ -200,6 +197,9 @@ namespace SixLabors.ImageSharp.Formats.Jpeg.Components.Decoder this.ct = -16; // Force reading 2 initial bytes to fill C. } + // Uses C# compiler's optimization to refer to static data segment directly, without any further allocation. + private static ReadOnlySpan FixedBin => new byte[] { 113, 0, 0, 0 }; + /// public int ResetInterval { @@ -916,7 +916,7 @@ namespace SixLabors.ImageSharp.Formats.Jpeg.Components.Decoder if (this.DecodeBinaryDecision(ref reader, ref Unsafe.Add(ref st, 1)) != 0) { - bool flag = this.DecodeBinaryDecision(ref reader, ref this.GetFixedBinReference()) != 0) + bool flag = this.DecodeBinaryDecision(ref reader, ref this.GetFixedBinReference()) != 0; coef = (short)(coef + (flag ? m1 : p1)); break;