Browse Source

Minor: Another instance of use Numerics.Modulo8 instead of % 8

pull/2134/head
Brian Popow 4 years ago
parent
commit
1b7f800c07
  1. 6
      src/ImageSharp/Formats/Tiff/Compression/Compressors/TiffCcittCompressor.cs

6
src/ImageSharp/Formats/Tiff/Compression/Compressors/TiffCcittCompressor.cs

@ -442,16 +442,16 @@ namespace SixLabors.ImageSharp.Formats.Tiff.Compression.Compressors
} }
/// <summary> /// <summary>
/// Pads output to the next byte /// Pads output to the next byte.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// If the output is not currently on a byte boundary, /// If the output is not currently on a byte boundary,
/// zero-pad it to the next byte /// zero-pad it to the next byte.
/// </remarks> /// </remarks>
protected void PadByte() protected void PadByte()
{ {
// Check if padding is necessary. // Check if padding is necessary.
if (this.bitPosition % 8 != 0) if (Numerics.Modulo8(this.bitPosition) != 0)
{ {
// Skip padding bits, move to next byte. // Skip padding bits, move to next byte.
this.bytePosition++; this.bytePosition++;

Loading…
Cancel
Save