Browse Source

Update raygui to avoid warnings

pull/5365/head
Ray 1 month ago
parent
commit
63fb407dc5
3 changed files with 3 additions and 24 deletions
  1. +1
    -8
      examples/core/raygui.h
  2. +1
    -8
      examples/shaders/raygui.h
  3. +1
    -8
      examples/shapes/raygui.h

+ 1
- 8
examples/core/raygui.h View File

@ -5079,25 +5079,18 @@ static const char **GetTextLines(const char *text, int *count)
int textSize = (int)strlen(text);
lines[0] = text;
int len = 0;
*count = 1;
//int lineSize = 0; // Stores current line size, not returned
for (int i = 0, k = 0; (i < textSize) && (*count < RAYGUI_MAX_TEXT_LINES); i++)
{
if (text[i] == '\n')
{
//lineSize = len;
k++;
lines[k] = &text[i + 1]; // WARNING: next value is valid?
len = 0;
lines[k] = &text[i + 1]; // WARNING: next value is valid?
*count += 1;
}
else len++;
}
//lines[*count - 1].size = len;
return lines;
}

+ 1
- 8
examples/shaders/raygui.h View File

@ -5079,25 +5079,18 @@ static const char **GetTextLines(const char *text, int *count)
int textSize = (int)strlen(text);
lines[0] = text;
int len = 0;
*count = 1;
//int lineSize = 0; // Stores current line size, not returned
for (int i = 0, k = 0; (i < textSize) && (*count < RAYGUI_MAX_TEXT_LINES); i++)
{
if (text[i] == '\n')
{
//lineSize = len;
k++;
lines[k] = &text[i + 1]; // WARNING: next value is valid?
len = 0;
lines[k] = &text[i + 1]; // WARNING: next value is valid?
*count += 1;
}
else len++;
}
//lines[*count - 1].size = len;
return lines;
}

+ 1
- 8
examples/shapes/raygui.h View File

@ -5079,25 +5079,18 @@ static const char **GetTextLines(const char *text, int *count)
int textSize = (int)strlen(text);
lines[0] = text;
int len = 0;
*count = 1;
//int lineSize = 0; // Stores current line size, not returned
for (int i = 0, k = 0; (i < textSize) && (*count < RAYGUI_MAX_TEXT_LINES); i++)
{
if (text[i] == '\n')
{
//lineSize = len;
k++;
lines[k] = &text[i + 1]; // WARNING: next value is valid?
len = 0;
lines[k] = &text[i + 1]; // WARNING: next value is valid?
*count += 1;
}
else len++;
}
//lines[*count - 1].size = len;
return lines;
}

Loading…
Cancel
Save