ソースを参照

Update raygui to avoid warnings

pull/5365/head
Ray 1ヶ月前
コミット
63fb407dc5
3個のファイルの変更3行の追加24行の削除
  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 ファイルの表示

@ -5079,25 +5079,18 @@ static const char **GetTextLines(const char *text, int *count)
int textSize = (int)strlen(text); int textSize = (int)strlen(text);
lines[0] = text; lines[0] = text;
int len = 0;
*count = 1; *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++) for (int i = 0, k = 0; (i < textSize) && (*count < RAYGUI_MAX_TEXT_LINES); i++)
{ {
if (text[i] == '\n') if (text[i] == '\n')
{ {
//lineSize = len;
k++; 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; *count += 1;
} }
else len++;
} }
//lines[*count - 1].size = len;
return lines; return lines;
} }

+ 1
- 8
examples/shaders/raygui.h ファイルの表示

@ -5079,25 +5079,18 @@ static const char **GetTextLines(const char *text, int *count)
int textSize = (int)strlen(text); int textSize = (int)strlen(text);
lines[0] = text; lines[0] = text;
int len = 0;
*count = 1; *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++) for (int i = 0, k = 0; (i < textSize) && (*count < RAYGUI_MAX_TEXT_LINES); i++)
{ {
if (text[i] == '\n') if (text[i] == '\n')
{ {
//lineSize = len;
k++; 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; *count += 1;
} }
else len++;
} }
//lines[*count - 1].size = len;
return lines; return lines;
} }

+ 1
- 8
examples/shapes/raygui.h ファイルの表示

@ -5079,25 +5079,18 @@ static const char **GetTextLines(const char *text, int *count)
int textSize = (int)strlen(text); int textSize = (int)strlen(text);
lines[0] = text; lines[0] = text;
int len = 0;
*count = 1; *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++) for (int i = 0, k = 0; (i < textSize) && (*count < RAYGUI_MAX_TEXT_LINES); i++)
{ {
if (text[i] == '\n') if (text[i] == '\n')
{ {
//lineSize = len;
k++; 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; *count += 1;
} }
else len++;
} }
//lines[*count - 1].size = len;
return lines; return lines;
} }

読み込み中…
キャンセル
保存