summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRay <[email protected]>2024-06-09 13:16:29 +0200
committerRay <[email protected]>2024-06-09 13:16:29 +0200
commit8cbde7f84c345b9c8ae9d226ed9ba315f14658b4 (patch)
treee90e4aa4aa7ee3870a146365462ef0ab61b65eef
parent6b3c1148bfbcd354dc7e6c825fb1e452c6e0fbfd (diff)
downloadraylib-8cbde7f84c345b9c8ae9d226ed9ba315f14658b4.tar.gz
raylib-8cbde7f84c345b9c8ae9d226ed9ba315f14658b4.zip
tweaks
-rw-r--r--src/rcore.c2
-rw-r--r--src/rtext.c19
2 files changed, 6 insertions, 15 deletions
diff --git a/src/rcore.c b/src/rcore.c
index 3aa5a7a6..a4fc4d67 100644
--- a/src/rcore.c
+++ b/src/rcore.c
@@ -2251,7 +2251,7 @@ bool IsFileNameValid(const char *fileName)
if ((fileName != NULL) && (fileName[0] != '\0'))
{
- int length = strlen(fileName);
+ int length = (int)strlen(fileName);
bool allPeriods = true;
for (int i = 0; i < length; i++)
diff --git a/src/rtext.c b/src/rtext.c
index 118a559d..6ad0f90a 100644
--- a/src/rtext.c
+++ b/src/rtext.c
@@ -1807,10 +1807,7 @@ const char *TextToSnake(const char *text)
}
buffer[i] = text[j] + 32;
}
- else
- {
- buffer[i] = text[j];
- }
+ else buffer[i] = text[j];
}
}
@@ -1827,23 +1824,17 @@ const char *TextToCamel(const char *text)
if (text != NULL)
{
// Lower case first character
- if ((text[0] >= 'A') && (text[0] <= 'Z'))
- buffer[0] = text[0] + 32;
- else
- buffer[0] = text[0];
+ if ((text[0] >= 'A') && (text[0] <= 'Z')) buffer[0] = text[0] + 32;
+ else buffer[0] = text[0];
// Check for next separator to upper case another character
for (int i = 1, j = 1; (i < MAX_TEXT_BUFFER_LENGTH - 1) && (text[j] != '\0'); i++, j++)
{
- if (text[j] != '_')
- buffer[i] = text[j];
+ if (text[j] != '_') buffer[i] = text[j];
else
{
j++;
- if ((text[j] >= 'a') && (text[j] <= 'z'))
- {
- buffer[i] = text[j] - 32;
- }
+ if ((text[j] >= 'a') && (text[j] <= 'z')) buffer[i] = text[j] - 32;
}
}
}