Browse Source

Remove unnecessary SetEndOfStream, we already have read all bytes from the stream BitReaderBase

pull/1803/head
Brian Popow 5 years ago
parent
commit
1e4352b8a1
  1. 12
      src/ImageSharp/Formats/Webp/BitReader/Vp8LBitReader.cs

12
src/ImageSharp/Formats/Webp/BitReader/Vp8LBitReader.cs

@ -138,7 +138,6 @@ namespace SixLabors.ImageSharp.Formats.Webp.BitReader
return (uint)val; return (uint)val;
} }
this.SetEndOfStream();
return 0; return 0;
} }
@ -203,17 +202,6 @@ namespace SixLabors.ImageSharp.Formats.Webp.BitReader
++this.pos; ++this.pos;
this.bitPos -= 8; this.bitPos -= 8;
} }
if (this.IsEndOfStream())
{
this.SetEndOfStream();
}
}
private void SetEndOfStream()
{
this.Eos = true;
this.bitPos = 0; // To avoid undefined behaviour with shifts.
} }
} }
} }

Loading…
Cancel
Save