Avoid warnings

This commit is contained in:
Ray
2025-09-29 18:05:16 +02:00
parent 0e57a572b4
commit 37149082e8

View File

@@ -1452,7 +1452,7 @@ Rectangle GetGlyphAtlasRec(Font font, int codepoint)
char **LoadTextLines(const char *text, int *count) char **LoadTextLines(const char *text, int *count)
{ {
int lineCount = 1; int lineCount = 1;
int textSize = strlen(text); int textSize = (int)strlen(text);
// Text pass to get required line count // Text pass to get required line count
for (int i = 0; i < textSize; i++) for (int i = 0; i < textSize; i++)
@@ -1679,7 +1679,7 @@ char *GetTextBetween(const char *text, const char *begin, const char *end)
if (beginIndex > -1) if (beginIndex > -1)
{ {
int beginLen = strlen(begin); int beginLen = (int)strlen(begin);
int endIndex = TextFindIndex(text + beginIndex + beginLen, end); int endIndex = TextFindIndex(text + beginIndex + beginLen, end);
if (endIndex > -1) if (endIndex > -1)
@@ -1758,15 +1758,15 @@ char *TextReplaceBetween(const char *text, const char *begin, const char *end, c
if (beginIndex > -1) if (beginIndex > -1)
{ {
int beginLen = strlen(begin); int beginLen = (int)strlen(begin);
int endIndex = TextFindIndex(text + beginIndex + beginLen, end); int endIndex = TextFindIndex(text + beginIndex + beginLen, end);
if (endIndex > -1) if (endIndex > -1)
{ {
endIndex += (beginIndex + beginLen); endIndex += (beginIndex + beginLen);
int textLen = strlen(text); int textLen = (int)strlen(text);
int replaceLen = (replacement == NULL)? 0 : strlen(replacement); int replaceLen = (replacement == NULL)? 0 : (int)strlen(replacement);
int toreplaceLen = endIndex - beginIndex - beginLen; int toreplaceLen = endIndex - beginIndex - beginLen;
result = (char *)RL_CALLOC(textLen + replaceLen - toreplaceLen + 1, sizeof(char)); result = (char *)RL_CALLOC(textLen + replaceLen - toreplaceLen + 1, sizeof(char));