From 1706a0dd86d5b4475f3da1a24cc54a4a365ed9a3 Mon Sep 17 00:00:00 2001 From: morkt Date: Wed, 19 Dec 2018 03:23:43 +0400 Subject: [PATCH] (uGOS): removed IDisposable interface from image reader. --- ArcFormats/uGOS/ImageBMP.cs | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/ArcFormats/uGOS/ImageBMP.cs b/ArcFormats/uGOS/ImageBMP.cs index 5054a575..d143c278 100644 --- a/ArcFormats/uGOS/ImageBMP.cs +++ b/ArcFormats/uGOS/ImageBMP.cs @@ -71,11 +71,9 @@ namespace GameRes.Formats.uGOS public override ImageData Read (IBinaryStream file, ImageMetaData info) { - using (var reader = new Reader (file, (DetBmpMetaData)info)) - { - reader.Unpack(); - return ImageData.CreateFlipped (info, reader.Format, null, reader.Data, reader.Stride); - } + var reader = new Reader (file, (DetBmpMetaData)info); + reader.Unpack(); + return ImageData.CreateFlipped (info, reader.Format, null, reader.Data, reader.Stride); } public override void Write (Stream file, ImageData image) @@ -83,7 +81,7 @@ namespace GameRes.Formats.uGOS throw new System.NotImplementedException ("DetBmpFormat.Write not implemented"); } - internal sealed class Reader : IDisposable + internal sealed class Reader { IBinaryStream m_input; byte[] m_output; @@ -451,12 +449,6 @@ namespace GameRes.Formats.uGOS dword_4CB750[i] = OffsetsX[i] + m_width * OffsetsY[i]; } } - - #region IDisposable Members - public void Dispose () - { - } - #endregion } } }