mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 12:08:47 +02:00
Fix Clang/GCC's null-conversion warning: (#2081)
The warning is "implicit conversion of NULL constant to 'unsigned int' [-Wnull-conversion]". Happens when ImTextureID is not a void*, but unsigned int, for example.
This commit is contained in:
2
imgui.h
2
imgui.h
@ -1597,7 +1597,7 @@ struct ImDrawCmd
|
||||
ImDrawCallback UserCallback; // If != NULL, call the function instead of rendering the vertices. clip_rect and texture_id will be set normally.
|
||||
void* UserCallbackData; // The draw callback code can access this.
|
||||
|
||||
ImDrawCmd() { ElemCount = 0; ClipRect.x = ClipRect.y = ClipRect.z = ClipRect.w = 0.0f; TextureId = NULL; UserCallback = NULL; UserCallbackData = NULL; }
|
||||
ImDrawCmd() { ElemCount = 0; ClipRect.x = ClipRect.y = ClipRect.z = ClipRect.w = 0.0f; TextureId = (ImTextureID)NULL; UserCallback = NULL; UserCallbackData = NULL; }
|
||||
};
|
||||
|
||||
// Vertex index (override with '#define ImDrawIdx unsigned int' inside in imconfig.h)
|
||||
|
Reference in New Issue
Block a user