From 7903213ff52f52b460cd97247475fa9b1de9e7c3 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Tue, 22 Feb 2022 21:08:35 -0500 Subject: [PATCH] ImGuiEngine: Minor cleanup --- imgui/ImGuiEngine.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/imgui/ImGuiEngine.cpp b/imgui/ImGuiEngine.cpp index 820bb7cbe..8224a73bf 100644 --- a/imgui/ImGuiEngine.cpp +++ b/imgui/ImGuiEngine.cpp @@ -31,10 +31,12 @@ void ImGuiEngine_Initialize(float scale) { ImGuiIO& io = ImGui::GetIO(); auto* fontData = new uint8_t[NOTO_MONO_FONT_DECOMPRESSED_SZ]; - metaforce::CMemoryInStream memStream(static_cast(NOTO_MONO_FONT), NOTO_MONO_FONT_SZ, - metaforce::CMemoryInStream::EOwnerShip::NotOwned); - metaforce::CZipInputStream zipInputStream(std::make_unique(memStream)); - zipInputStream.Get(fontData, NOTO_MONO_FONT_DECOMPRESSED_SZ); + { + auto stream = std::make_unique( + static_cast(NOTO_MONO_FONT), NOTO_MONO_FONT_SZ, metaforce::CMemoryInStream::EOwnerShip::NotOwned); + metaforce::CZipInputStream zipInputStream{std::move(stream)}; + zipInputStream.Get(fontData, NOTO_MONO_FONT_DECOMPRESSED_SZ); + } ImFontConfig fontConfig{}; fontConfig.FontData = fontData;