mirror of https://github.com/ocornut/imgui
Texture-based round corners: fixed unused variables warnings.
This commit is contained in:
parent
f476dbe834
commit
9e6430ebb3
|
@ -1460,8 +1460,7 @@ inline bool AddRoundCornerRect(ImDrawList* draw_list, const ImVec2& a, const ImV
|
||||||
if ((round_corner_data.RectId < 0) || (square_corner_data.RectId < 0))
|
if ((round_corner_data.RectId < 0) || (square_corner_data.RectId < 0))
|
||||||
return false; // No data for this configuration
|
return false; // No data for this configuration
|
||||||
|
|
||||||
ImTextureID tex_id = data->Font->ContainerAtlas->TexID;
|
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(tex_id == 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
|
// 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)
|
// - corner_uv[0] is the innermost point of the circle (solid for filled circles)
|
||||||
|
@ -1877,8 +1876,7 @@ inline bool AddRoundCornerCircle(ImDrawList* draw_list, const ImVec2& center, fl
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
const ImDrawListSharedData* data = draw_list->_Data;
|
const ImDrawListSharedData* data = draw_list->_Data;
|
||||||
ImTextureID tex_id = data->Font->ContainerAtlas->TexID;
|
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(tex_id == 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
|
IM_ASSERT_PARANOID(!(data->Font->ContainerAtlas->Flags & ImFontAtlasFlags_NoBakedRoundCorners)); // No data in font
|
||||||
|
|
||||||
// Filled rectangles have no stroke width
|
// Filled rectangles have no stroke width
|
||||||
|
@ -3868,6 +3866,7 @@ static void ImFontAtlasBuildRenderRoundCornersTexData(ImFontAtlas* atlas)
|
||||||
const int w = atlas->TexWidth;
|
const int w = atlas->TexWidth;
|
||||||
const unsigned int max = ImFontAtlasRoundCornersMaxSize * ImFontAtlasRoundCornersMaxStrokeWidth;
|
const unsigned int max = ImFontAtlasRoundCornersMaxSize * ImFontAtlasRoundCornersMaxStrokeWidth;
|
||||||
const int pad = FONT_ATLAS_ROUNDED_CORNER_TEX_PADDING;
|
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->TexRoundCornerData.Size == (int)max); // ImFontAtlasBuildRegisterRoundCornersCustomRects() will have created these for us
|
||||||
IM_ASSERT(atlas->TexSquareCornerData.Size == (int)max);
|
IM_ASSERT(atlas->TexSquareCornerData.Size == (int)max);
|
||||||
|
|
||||||
|
@ -5163,6 +5162,7 @@ bool ImGui::RenderWindowResizeGrip(ImDrawList* draw_list, const ImVec2& corner,
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
ImFontAtlas* atlas = draw_list->_Data->Font->ContainerAtlas;
|
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(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(ImIsPowerOfTwo(flags)); // Only allow a single corner to be specified here.
|
||||||
IM_ASSERT_PARANOID((atlas->Flags & ImFontAtlasFlags_NoBakedRoundCorners) == 0);
|
IM_ASSERT_PARANOID((atlas->Flags & ImFontAtlasFlags_NoBakedRoundCorners) == 0);
|
||||||
|
|
Loading…
Reference in New Issue