From 474305c476a777c94db750c961af5a94c6df4237 Mon Sep 17 00:00:00 2001 From: ocornut Date: Fri, 14 Feb 2025 16:15:09 +0100 Subject: [PATCH] ImFont: simpler constructor. --- imgui_draw.cpp | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/imgui_draw.cpp b/imgui_draw.cpp index 5bf0f0b18..ca66b6d79 100644 --- a/imgui_draw.cpp +++ b/imgui_draw.cpp @@ -3685,21 +3685,8 @@ void ImFontGlyphRangesBuilder::BuildRanges(ImVector* out_ranges) ImFont::ImFont() { - FontSize = 0.0f; - FallbackAdvanceX = 0.0f; - FallbackChar = 0; - EllipsisChar = 0; - EllipsisWidth = EllipsisCharStep = 0.0f; - EllipsisCharCount = 0; - FallbackGlyph = NULL; - ContainerAtlas = NULL; - ConfigData = NULL; - ConfigDataCount = 0; - DirtyLookupTables = false; + memset(this, 0, sizeof(*this)); Scale = 1.0f; - Ascent = Descent = 0.0f; - MetricsTotalSurface = 0; - memset(Used8kPagesMap, 0, sizeof(Used8kPagesMap)); } ImFont::~ImFont()