From 9243aee62cca21e833f4b27a91aa90abae4cb25f Mon Sep 17 00:00:00 2001 From: ocornut Date: Wed, 11 Nov 2015 10:26:12 +0000 Subject: [PATCH] Fixed unused variable warning if asserts are compiled out. --- imgui.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/imgui.cpp b/imgui.cpp index 5315a7b8..78514b18 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -2263,6 +2263,7 @@ static void AddDrawListToRenderList(ImVector& out_render_list, ImDr // Check that draw_list doesn't use more vertices than indexable (default ImDrawIdx = 2 bytes = 64K vertices) // If this assert triggers because you are drawing lots of stuff manually, A) workaround by calling BeginChild()/EndChild() to put your draw commands in multiple draw lists, B) #define ImDrawIdx to a 'unsigned int' in imconfig.h and render accordingly. const unsigned long long int max_vtx_idx = (unsigned long long int)1L << (sizeof(ImDrawIdx)*8); + (void)max_vtx_idx; IM_ASSERT((unsigned long long int)draw_list->_VtxCurrentIdx <= max_vtx_idx); GImGui->IO.MetricsRenderVertices += draw_list->VtxBuffer.Size;