mirror of
https://github.com/ocornut/imgui.git
synced 2025-01-19 01:34:08 +01:00
Fixed static analyzer warning "Pointer to local array 'overlay_buf' is stored outside the scope". Technically not used outside that scope, but best to play nice.
This commit is contained in:
parent
50b2ff0bf0
commit
558c57a086
@ -1316,9 +1316,9 @@ void ImGui::ProgressBar(float fraction, const ImVec2& size_arg, const char* over
|
|||||||
|
|
||||||
// Default displaying the fraction as percentage string, but user can override it
|
// Default displaying the fraction as percentage string, but user can override it
|
||||||
// Don't display text for indeterminate bars by default
|
// Don't display text for indeterminate bars by default
|
||||||
|
char overlay_buf[32];
|
||||||
if (!is_indeterminate || overlay != NULL)
|
if (!is_indeterminate || overlay != NULL)
|
||||||
{
|
{
|
||||||
char overlay_buf[32];
|
|
||||||
if (!overlay)
|
if (!overlay)
|
||||||
{
|
{
|
||||||
ImFormatString(overlay_buf, IM_ARRAYSIZE(overlay_buf), "%.0f%%", fraction * 100 + 0.01f);
|
ImFormatString(overlay_buf, IM_ARRAYSIZE(overlay_buf), "%.0f%%", fraction * 100 + 0.01f);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user