From fcaab0e9efd385a6a137cfd9e92b4f3eb9666da3 Mon Sep 17 00:00:00 2001 From: Hanaxar <87268284+hanaxar@users.noreply.github.com> Date: Thu, 20 Apr 2023 01:23:27 +0300 Subject: [PATCH] Avoid compiler warning about signedness (#272) Proposing to change type of ```textBoxCursorIndex``` from ```unsigned int``` to ```int``` for avoiding bunch of compiler warnings about signedness. ```textBoxCursorIndex``` is used in many arithmethic operations and comparions with int types, the only way to eliminate warnings, is either casting it to int everytime or declaring as int at the beginning. The latter is proposed. --- src/raygui.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/raygui.h b/src/raygui.h index e332a5d..3995a0c 100644 --- a/src/raygui.h +++ b/src/raygui.h @@ -1209,7 +1209,7 @@ static unsigned int guiIconScale = 1; // Gui icon default scale (if ic static bool guiTooltip = false; // Tooltip enabled/disabled static const char *guiTooltipPtr = NULL; // Tooltip string pointer (string provided by user) -static unsigned int textBoxCursorIndex = 0; // Cursor index, shared by all GuiTextBox*() +static int textBoxCursorIndex = 0; // Cursor index, shared by all GuiTextBox*() //static int blinkCursorFrameCounter = 0; // Frame counter for cursor blinking static int autoCursorCooldownCounter = 0; // Cooldown frame counter for automatic cursor movement on key-down static int autoCursorDelayCounter = 0; // Delay frame counter for automatic cursor movement