FAQ, Readme. Use = {} instead of = { 0 }, wasn't problematic because they were all static variables or one stack array not read. But hey.

This commit is contained in:
omar
2019-10-18 12:54:30 +02:00
parent 9994f5bcbe
commit 53278be61f
8 changed files with 44 additions and 19 deletions

View File

@ -923,7 +923,7 @@ static void ShowDemoWindowWidgets()
if (ImGui::TreeNode("In columns"))
{
ImGui::Columns(3, NULL, false);
static bool selected[16] = { 0 };
static bool selected[16] = {};
for (int i = 0; i < 16; i++)
{
char label[32]; sprintf(label, "Item %d", i);
@ -1075,7 +1075,7 @@ static void ShowDemoWindowWidgets()
// Create a dummy array of contiguous float values to plot
// Tip: If your float aren't contiguous but part of a structure, you can pass a pointer to your first float and the sizeof() of your structure in the Stride parameter.
static float values[90] = { 0 };
static float values[90] = {};
static int values_offset = 0;
static double refresh_time = 0.0;
if (!animate || refresh_time == 0.0)
@ -1176,7 +1176,7 @@ static void ShowDemoWindowWidgets()
// Generate a dummy default palette. The palette will persist and can be edited.
static bool saved_palette_init = true;
static ImVec4 saved_palette[32] = { };
static ImVec4 saved_palette[32] = {};
if (saved_palette_init)
{
for (int n = 0; n < IM_ARRAYSIZE(saved_palette); n++)