Browse Source

Array.Clear is faster and looks nicer in source

af/merge-core
luuk 9 years ago
parent
commit
afa4313fe3
  1. 5
      src/ImageSharp/Formats/Png/PngDecoderCore.cs

5
src/ImageSharp/Formats/Png/PngDecoderCore.cs

@ -340,10 +340,7 @@ namespace ImageSharp.Formats
byte[] scanline = ArrayPool<byte>.Shared.Rent(this.bytesPerScanline);
// Zero out the previousScanline, because the bytes that are rented from the arraypool may not be zero.
for (var i = 0; i < bytesPerScanline; i++)
{
previousScanline[i] = 0x00;
}
Array.Clear(previousScanline, 0, this.bytesPerScanline);
try
{

Loading…
Cancel
Save