Texture-based round corners: fixed unused variables warnings.
diff --git a/imgui_draw.cpp b/imgui_draw.cpp index 1de5e78..acccece 100644 --- a/imgui_draw.cpp +++ b/imgui_draw.cpp
@@ -1467,8 +1467,7 @@ if ((round_corner_data.RectId < 0) || (square_corner_data.RectId < 0)) return false; // No data for this configuration - ImTextureID tex_id = data->Font->ContainerAtlas->TexID; - IM_ASSERT(tex_id == draw_list->_TextureIdStack.back()); // Use high-level ImGui::PushFont() or low-level ImDrawList::PushTextureId() to change font. + IM_ASSERT(data->Font->ContainerAtlas->TexID == draw_list->_TextureIdStack.back()); // Use high-level ImGui::PushFont() or low-level ImDrawList::PushTextureId() to change font. // Calculate UVs for the three points we are interested in from the texture // - corner_uv[0] is the innermost point of the circle (solid for filled circles) @@ -1884,8 +1883,7 @@ return false; const ImDrawListSharedData* data = draw_list->_Data; - ImTextureID tex_id = data->Font->ContainerAtlas->TexID; - IM_ASSERT(tex_id == draw_list->_TextureIdStack.back()); // Use high-level ImGui::PushFont() or low-level ImDrawList::PushTextureId() to change font. + IM_ASSERT(data->Font->ContainerAtlas->TexID == draw_list->_TextureIdStack.back()); // Use high-level ImGui::PushFont() or low-level ImDrawList::PushTextureId() to change font. IM_ASSERT_PARANOID(!(data->Font->ContainerAtlas->Flags & ImFontAtlasFlags_NoBakedRoundCorners)); // No data in font // Filled rectangles have no stroke width @@ -3877,6 +3875,7 @@ const int w = atlas->TexWidth; const unsigned int max = ImFontAtlasRoundCornersMaxSize * ImFontAtlasRoundCornersMaxStrokeWidth; const int pad = FONT_ATLAS_ROUNDED_CORNER_TEX_PADDING; + IM_UNUSED(max); IM_ASSERT(atlas->TexRoundCornerData.Size == (int)max); // ImFontAtlasBuildRegisterRoundCornersCustomRects() will have created these for us IM_ASSERT(atlas->TexSquareCornerData.Size == (int)max); @@ -5172,6 +5171,7 @@ return false; ImFontAtlas* atlas = draw_list->_Data->Font->ContainerAtlas; + IM_UNUSED(atlas); IM_ASSERT(atlas->TexID == draw_list->_TextureIdStack.back()); // Use high-level ImGui::PushFont() or low-level ImDrawList::PushTextureId() to change font. IM_ASSERT(ImIsPowerOfTwo(flags)); // Only allow a single corner to be specified here. IM_ASSERT_PARANOID((atlas->Flags & ImFontAtlasFlags_NoBakedRoundCorners) == 0);