From 63fb407dc5e8f28570aab7c0f7e48acc8caa7742 Mon Sep 17 00:00:00 2001 From: Ray Date: Wed, 19 Nov 2025 13:07:57 +0100 Subject: [PATCH] Update raygui to avoid warnings --- examples/core/raygui.h | 9 +-------- examples/shaders/raygui.h | 9 +-------- examples/shapes/raygui.h | 9 +-------- 3 files changed, 3 insertions(+), 24 deletions(-) diff --git a/examples/core/raygui.h b/examples/core/raygui.h index f86247ac4..88fe5cc5b 100644 --- a/examples/core/raygui.h +++ b/examples/core/raygui.h @@ -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; } diff --git a/examples/shaders/raygui.h b/examples/shaders/raygui.h index f86247ac4..88fe5cc5b 100644 --- a/examples/shaders/raygui.h +++ b/examples/shaders/raygui.h @@ -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; } diff --git a/examples/shapes/raygui.h b/examples/shapes/raygui.h index f86247ac4..88fe5cc5b 100644 --- a/examples/shapes/raygui.h +++ b/examples/shapes/raygui.h @@ -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; }