From c3ea1748dc124ca4a209d54219d9b55b7817244e Mon Sep 17 00:00:00 2001 From: Elias Daler Date: Sun, 24 Feb 2019 20:35:52 +0300 Subject: [PATCH] Fix -Wconversion warning (#2379) The warning was caused by implicit conversion from pointer type which NULL has to non-pointer type, e.g. if ImTextureID is long int --- imgui_draw.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui_draw.cpp b/imgui_draw.cpp index 37e8ff51..25ce75fe 100644 --- a/imgui_draw.cpp +++ b/imgui_draw.cpp @@ -407,7 +407,7 @@ ImDrawList* ImDrawList::CloneOutput() const // Using macros because C++ is a terrible language, we want guaranteed inline, no code in header, and no overhead in Debug builds #define GetCurrentClipRect() (_ClipRectStack.Size ? _ClipRectStack.Data[_ClipRectStack.Size-1] : _Data->ClipRectFullscreen) -#define GetCurrentTextureId() (_TextureIdStack.Size ? _TextureIdStack.Data[_TextureIdStack.Size-1] : NULL) +#define GetCurrentTextureId() (_TextureIdStack.Size ? _TextureIdStack.Data[_TextureIdStack.Size-1] : (ImTextureID)NULL) void ImDrawList::AddDrawCmd() {