[rtext] fix: misuse of cast in GetCodepointCount (#4741)
I was really wondering what is going on here :D I believe this code tried initially to out-cast 'const' specifier but this is not needed here at all. Currently, it just confuses whoever reads this so I changed it. The old code would also trigger -Wcast-qual warning on some compilers.
This commit is contained in:
parent
1f6de0c507
commit
99dfec070a
|
|
@ -1915,7 +1915,7 @@ void UnloadCodepoints(int *codepoints)
|
||||||
int GetCodepointCount(const char *text)
|
int GetCodepointCount(const char *text)
|
||||||
{
|
{
|
||||||
unsigned int length = 0;
|
unsigned int length = 0;
|
||||||
char *ptr = (char *)&text[0];
|
const char *ptr = text;
|
||||||
|
|
||||||
while (*ptr != '\0')
|
while (*ptr != '\0')
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user