Skip to content

Commit 90ac3a2

Browse files
committed
Make skipblock static to fix build
1 parent 94fd43f commit 90ac3a2

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/ImageSharp/Formats/Gif/GifDecoderCore.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public Image<TPixel> Decode<TPixel>(BufferedReadStream stream, CancellationToken
140140
this.ReadApplicationExtension(stream);
141141
break;
142142
case GifConstants.PlainTextLabel:
143-
this.SkipBlock(stream); // Not supported by any known decoder.
143+
SkipBlock(stream); // Not supported by any known decoder.
144144
break;
145145
}
146146
}
@@ -189,7 +189,7 @@ public ImageInfo Identify(BufferedReadStream stream, CancellationToken cancellat
189189
switch (stream.ReadByte())
190190
{
191191
case GifConstants.GraphicControlLabel:
192-
this.SkipBlock(stream); // Skip graphic control extension block
192+
SkipBlock(stream); // Skip graphic control extension block
193193
break;
194194
case GifConstants.CommentLabel:
195195
this.ReadComments(stream);
@@ -198,7 +198,7 @@ public ImageInfo Identify(BufferedReadStream stream, CancellationToken cancellat
198198
this.ReadApplicationExtension(stream);
199199
break;
200200
case GifConstants.PlainTextLabel:
201-
this.SkipBlock(stream); // Not supported by any known decoder.
201+
SkipBlock(stream); // Not supported by any known decoder.
202202
break;
203203
}
204204
}
@@ -307,7 +307,7 @@ private void ReadApplicationExtension(BufferedReadStream stream)
307307
{
308308
// Reset the stream position and continue.
309309
stream.Position = position;
310-
this.SkipBlock(stream, appLength);
310+
SkipBlock(stream, appLength);
311311
}
312312

313313
return;
@@ -327,20 +327,20 @@ private void ReadApplicationExtension(BufferedReadStream stream)
327327

328328
// Could be something else not supported yet.
329329
// Skip the subblock and terminator.
330-
this.SkipBlock(stream, subBlockSize);
330+
SkipBlock(stream, subBlockSize);
331331

332332
return;
333333
}
334334

335-
this.SkipBlock(stream, appLength); // Not supported by any known decoder.
335+
SkipBlock(stream, appLength); // Not supported by any known decoder.
336336
}
337337

338338
/// <summary>
339339
/// Skips over a block or reads its terminator.
340340
/// <param name="blockSize">The length of the block to skip.</param>
341341
/// <param name="stream">The <see cref="BufferedReadStream"/> containing image data.</param>
342342
/// </summary>
343-
private void SkipBlock(BufferedReadStream stream, int blockSize = 0)
343+
private static void SkipBlock(BufferedReadStream stream, int blockSize = 0)
344344
{
345345
if (blockSize > 0)
346346
{
@@ -363,7 +363,7 @@ private void ReadComments(BufferedReadStream stream)
363363
{
364364
int length;
365365

366-
var stringBuilder = new StringBuilder();
366+
StringBuilder stringBuilder = new StringBuilder();
367367
while ((length = stream.ReadByte()) != 0)
368368
{
369369
if (length > GifConstants.MaxCommentSubBlockLength)
@@ -432,7 +432,7 @@ private void ReadFrame<TPixel>(BufferedReadStream stream, ref Image<TPixel>? ima
432432
this.ReadFrameColors(ref image, ref previousFrame, indices, colorTable, this.imageDescriptor);
433433

434434
// Skip any remaining blocks
435-
this.SkipBlock(stream);
435+
SkipBlock(stream);
436436
}
437437
finally
438438
{

0 commit comments

Comments
 (0)