From 9456e698f50f4071d750754480f13afa909d5a3f Mon Sep 17 00:00:00 2001 From: Ynse Hoornenborg Date: Wed, 19 Feb 2025 20:43:53 +0100 Subject: [PATCH] Fix compiler warnings --- src/ImageSharp/Common/Helpers/DisposableDictionary.cs | 1 - src/ImageSharp/Common/Helpers/DisposableList.cs | 1 - src/ImageSharp/Formats/Heif/HeifDecoderCore.cs | 7 +++---- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/ImageSharp/Common/Helpers/DisposableDictionary.cs b/src/ImageSharp/Common/Helpers/DisposableDictionary.cs index 3b078f25ca..3ba0ac62c0 100644 --- a/src/ImageSharp/Common/Helpers/DisposableDictionary.cs +++ b/src/ImageSharp/Common/Helpers/DisposableDictionary.cs @@ -38,5 +38,4 @@ public sealed class DisposableDictionary : Dictionary : List, IDisposable this.disposedValue = true; } } - } diff --git a/src/ImageSharp/Formats/Heif/HeifDecoderCore.cs b/src/ImageSharp/Formats/Heif/HeifDecoderCore.cs index 6da3d100d9..c98b8c659c 100644 --- a/src/ImageSharp/Formats/Heif/HeifDecoderCore.cs +++ b/src/ImageSharp/Formats/Heif/HeifDecoderCore.cs @@ -1,7 +1,6 @@ // Copyright (c) Six Labors. // Licensed under the Six Labors Split License. -using System; using System.Buffers; using System.Buffers.Binary; using System.Text; @@ -47,8 +46,8 @@ internal sealed class HeifDecoderCore : ImageDecoderCore { this.configuration = options.Configuration; this.metadata = new ImageMetadata(); - this.items = new List(); - this.itemLinks = new List(); + this.items = []; + this.itemLinks = []; } /// @@ -707,7 +706,7 @@ internal sealed class HeifDecoderCore : ImageDecoderCore return itemDecoder.DecodeItemData(this.configuration, itemToDecode, itemMemory.GetSpan()); } - private Image DecodeGrid(HeifItem gridItem, IDictionary> buffers) + private Image DecodeGrid(HeifItem gridItem, DisposableDictionary> buffers) where TPixel : unmanaged, IPixel { List linked = this.itemLinks.First(l => l.SourceId == gridItem.Id).DestinationIds;