Skip to content

Commit 8cbde7f

Browse files
committed
tweaks
1 parent 6b3c114 commit 8cbde7f

File tree

2 files changed

+6
-15
lines changed

2 files changed

+6
-15
lines changed

src/rcore.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -2251,7 +2251,7 @@ bool IsFileNameValid(const char *fileName)
22512251

22522252
if ((fileName != NULL) && (fileName[0] != '\0'))
22532253
{
2254-
int length = strlen(fileName);
2254+
int length = (int)strlen(fileName);
22552255
bool allPeriods = true;
22562256

22572257
for (int i = 0; i < length; i++)

src/rtext.c

+5-14
Original file line numberDiff line numberDiff line change
@@ -1807,10 +1807,7 @@ const char *TextToSnake(const char *text)
18071807
}
18081808
buffer[i] = text[j] + 32;
18091809
}
1810-
else
1811-
{
1812-
buffer[i] = text[j];
1813-
}
1810+
else buffer[i] = text[j];
18141811
}
18151812
}
18161813

@@ -1827,23 +1824,17 @@ const char *TextToCamel(const char *text)
18271824
if (text != NULL)
18281825
{
18291826
// Lower case first character
1830-
if ((text[0] >= 'A') && (text[0] <= 'Z'))
1831-
buffer[0] = text[0] + 32;
1832-
else
1833-
buffer[0] = text[0];
1827+
if ((text[0] >= 'A') && (text[0] <= 'Z')) buffer[0] = text[0] + 32;
1828+
else buffer[0] = text[0];
18341829

18351830
// Check for next separator to upper case another character
18361831
for (int i = 1, j = 1; (i < MAX_TEXT_BUFFER_LENGTH - 1) && (text[j] != '\0'); i++, j++)
18371832
{
1838-
if (text[j] != '_')
1839-
buffer[i] = text[j];
1833+
if (text[j] != '_') buffer[i] = text[j];
18401834
else
18411835
{
18421836
j++;
1843-
if ((text[j] >= 'a') && (text[j] <= 'z'))
1844-
{
1845-
buffer[i] = text[j] - 32;
1846-
}
1837+
if ((text[j] >= 'a') && (text[j] <= 'z')) buffer[i] = text[j] - 32;
18471838
}
18481839
}
18491840
}

0 commit comments

Comments
 (0)