Fix various XCode and PVS-Studio static analyzer warnings (#2309)

This commit is contained in:
omar
2019-01-27 15:27:49 +01:00
parent 20bc06af70
commit c3c2cd1e82
8 changed files with 35 additions and 25 deletions

View File

@ -2063,6 +2063,7 @@ void ImFontAtlasBuildSetupFont(ImFontAtlas* atlas, ImFont* font, ImFontConfig* f
void ImFontAtlasBuildPackCustomRects(ImFontAtlas* atlas, void* stbrp_context_opaque)
{
stbrp_context* pack_context = (stbrp_context*)stbrp_context_opaque;
IM_ASSERT(pack_context != NULL);
ImVector<ImFontAtlas::CustomRect>& user_rects = atlas->CustomRects;
IM_ASSERT(user_rects.Size >= 1); // We expect at least the default custom rects to be registered, else something went wrong.