From 6b8accbfa1bca2d755e6dd14c18da5c17ef61488 Mon Sep 17 00:00:00 2001 From: ocornut Date: Tue, 8 Oct 2024 14:29:21 +0200 Subject: [PATCH] Fixed building when defining ImTextureID to a multi-token name. (#1641) Amend 92b9498 --- imgui_draw.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/imgui_draw.cpp b/imgui_draw.cpp index 0c10a79b7..b69bc789f 100644 --- a/imgui_draw.cpp +++ b/imgui_draw.cpp @@ -619,7 +619,7 @@ void ImDrawList::PushTextureID(ImTextureID texture_id) void ImDrawList::PopTextureID() { _TextureIdStack.pop_back(); - _CmdHeader.TextureId = (_TextureIdStack.Size == 0) ? ImTextureID() : _TextureIdStack.Data[_TextureIdStack.Size - 1]; + _CmdHeader.TextureId = (_TextureIdStack.Size == 0) ? (ImTextureID)NULL : _TextureIdStack.Data[_TextureIdStack.Size - 1]; _OnChangedTextureID(); } @@ -2777,7 +2777,7 @@ static bool ImFontAtlasBuildWithStbTruetype(ImFontAtlas* atlas) ImFontAtlasBuildInit(atlas); // Clear atlas - atlas->TexID = ImTextureID(); + atlas->TexID = (ImTextureID)NULL; atlas->TexWidth = atlas->TexHeight = 0; atlas->TexUvScale = ImVec2(0.0f, 0.0f); atlas->TexUvWhitePixel = ImVec2(0.0f, 0.0f);