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:
@ -1395,7 +1395,7 @@ ImFontAtlas::ImFontAtlas()
|
||||
{
|
||||
Locked = false;
|
||||
Flags = ImFontAtlasFlags_None;
|
||||
TexID = NULL;
|
||||
TexID = (ImTextureID)NULL;
|
||||
TexDesiredWidth = 0;
|
||||
TexGlyphPadding = 1;
|
||||
|
||||
@ -1711,7 +1711,7 @@ bool ImFontAtlasBuildWithStbTruetype(ImFontAtlas* atlas)
|
||||
|
||||
ImFontAtlasBuildRegisterDefaultCustomRects(atlas);
|
||||
|
||||
atlas->TexID = NULL;
|
||||
atlas->TexID = (ImTextureID)NULL;
|
||||
atlas->TexWidth = atlas->TexHeight = 0;
|
||||
atlas->TexUvScale = ImVec2(0.0f, 0.0f);
|
||||
atlas->TexUvWhitePixel = ImVec2(0.0f, 0.0f);
|
||||
|
Reference in New Issue
Block a user