mirror of
https://github.com/raysan5/raylib.git
synced 2025-10-06 18:06:28 +00:00
Avoid warnings
This commit is contained in:
10
src/rtext.c
10
src/rtext.c
@@ -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));
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user