1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-01-09 23:54:20 +00:00

Internals: packing ImGuiDataVarInfo + misc renaming + value of ImGuiDataType_Pointer doesn't need to be Count+1

This commit is contained in:
ocornut 2025-02-19 16:49:35 +01:00 committed by ocornut
parent 1e18a6cf60
commit 434b7710f3
2 changed files with 13 additions and 13 deletions

View file

@ -814,9 +814,9 @@ struct ImDrawDataBuilder
struct ImGuiDataVarInfo
{
ImGuiDataType Type;
ImU32 Count; // 1+
ImU32 Offset; // Offset in parent structure
ImGuiDataType DataType : 8;
ImU32 Count : 8; // 1+
ImU32 Offset : 16; // Offset in parent structure
void* GetVarPtr(void* parent) const { return (void*)((unsigned char*)parent + Offset); }
};
@ -837,7 +837,7 @@ struct ImGuiDataTypeInfo
// Extend ImGuiDataType_
enum ImGuiDataTypePrivate_
{
ImGuiDataType_Pointer = ImGuiDataType_COUNT + 1,
ImGuiDataType_Pointer = ImGuiDataType_COUNT,
ImGuiDataType_ID,
};