From a8062229b0dd455b5fe7a9e1c26b028fb4974669 Mon Sep 17 00:00:00 2001 From: Jeffery Myers Date: Mon, 7 Nov 2022 02:14:52 -0800 Subject: [PATCH] small fixes for strict compilers (#240) --- src/raygui.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/raygui.h b/src/raygui.h index 0e50043..9743149 100644 --- a/src/raygui.h +++ b/src/raygui.h @@ -3284,8 +3284,8 @@ Vector2 GuiGrid(Rectangle bounds, const char *text, float spacing, int subdivs) if (CheckCollisionPointRec(mousePoint, bounds)) { // NOTE: Cell values must be rounded to int - currentCell.x = (int)((mousePoint.x - bounds.x)/spacing); - currentCell.y = (int)((mousePoint.y - bounds.y)/spacing); + currentCell.x = roundf((mousePoint.x - bounds.x)/spacing); + currentCell.y = roundf((mousePoint.y - bounds.y)/spacing); } } //-------------------------------------------------------------------- @@ -3889,11 +3889,11 @@ static const char *GetTextIcon(const char *text, int *iconId) } // Get text divided into lines (by line-breaks '\n') -char **GetTextLines(char *text, int *count) +const char **GetTextLines(const char *text, int *count) { #define RAYGUI_MAX_TEXT_LINES 128 - static char *lines[RAYGUI_MAX_TEXT_LINES] = { 0 }; + static const char *lines[RAYGUI_MAX_TEXT_LINES] = { 0 }; memset(lines, 0, sizeof(char *)); int textSize = (int)strlen(text);