From 76f5be2749ed17f02f0fcef402894340baece0ac Mon Sep 17 00:00:00 2001 From: ocornut Date: Thu, 25 Jun 2026 22:10:52 +0200 Subject: [PATCH] Settings: minor struct packing. --- imgui.h | 2 +- imgui_internal.h | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/imgui.h b/imgui.h index d498355f4..4f659c38f 100644 --- a/imgui.h +++ b/imgui.h @@ -4035,7 +4035,7 @@ struct ImGuiPlatformIO // Optional: Platform locale // [Experimental] Configure decimal point e.g. '.' or ',' useful for some languages (e.g. German), generally pulled from *localeconv()->decimal_point - ImWchar Platform_LocaleDecimalPoint; // '.' + ImWchar Platform_LocaleDecimalPoint; // '.' //------------------------------------------------------------------ // Input - Interface with Renderer Backend diff --git a/imgui_internal.h b/imgui_internal.h index 36b205d3c..7f07a5439 100644 --- a/imgui_internal.h +++ b/imgui_internal.h @@ -2014,13 +2014,13 @@ struct ImGuiViewportP : public ImGuiViewport // (this is designed to be stored in a ImChunkStream buffer, with the variable-length Name following our structure) struct ImGuiWindowSettings { - ImGuiID ID; - ImVec2ih Pos; - ImVec2ih Size; - bool Collapsed; - bool IsChild; - bool WantApply; // Set when loaded from .ini data (to enable merging/loading .ini data into an already running context) - bool WantDelete; // Set to invalidate/delete the settings entry + ImGuiID ID; + ImVec2ih Pos; + ImVec2ih Size; + bool Collapsed : 1; + bool IsChild : 1; + bool WantApply : 1; // Set when loaded from .ini data (to enable merging/loading .ini data into an already running context) + bool WantDelete : 1; // Set to invalidate/delete the settings entry ImGuiWindowSettings() { memset((void*)this, 0, sizeof(*this)); } char* GetName() { return (char*)(this + 1); } @@ -3203,7 +3203,7 @@ struct ImGuiTableSettings float RefScale; // Reference scale to be able to rescale columns on font/dpi changes. ImGuiTableColumnIdx ColumnsCount; ImGuiTableColumnIdx ColumnsCountMax; // Maximum number of columns this settings instance can store, we can recycle a settings instance with lower number of columns but not higher - bool WantApply; // Set when loaded from .ini data (to enable merging/loading .ini data into an already running context) + bool WantApply : 1; // Set when loaded from .ini data (to enable merging/loading .ini data into an already running context) ImGuiTableSettings() { memset((void*)this, 0, sizeof(*this)); } ImGuiTableColumnSettings* GetColumnSettings() { return (ImGuiTableColumnSettings*)(this + 1); }