From fb959e07fc6471f0385068d915813778bc74a46d Mon Sep 17 00:00:00 2001 From: Asriel Camora Date: Tue, 29 Apr 2025 14:28:22 -0700 Subject: [PATCH] Minor nitpick --- Craftimizer/Utils/IconManager.cs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Craftimizer/Utils/IconManager.cs b/Craftimizer/Utils/IconManager.cs index a31f50b..9903084 100644 --- a/Craftimizer/Utils/IconManager.cs +++ b/Craftimizer/Utils/IconManager.cs @@ -61,9 +61,9 @@ public sealed class IconManager : IDisposable } // TODO: Unload when unused, but with a custom timer? - private sealed class CachedIcon : ITextureIcon + private sealed class CachedIcon(ISharedImmediateTexture source) : ITextureIcon { - private LoadedIcon Base { get; } + private LoadedIcon Base { get; } = new(source); public ISharedImmediateTexture Source => Base.Source; @@ -71,11 +71,6 @@ public sealed class IconManager : IDisposable public nint ImGuiHandle => Base.ImGuiHandle; - public CachedIcon(ISharedImmediateTexture source) - { - Base = new(source); - } - public void Release() { Base.Dispose();