Settings: minor struct packing.

This commit is contained in:
ocornut
2026-06-25 22:10:52 +02:00
parent 60fbdbb8d8
commit 76f5be2749
2 changed files with 9 additions and 9 deletions

View File

@@ -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

View File

@@ -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); }