ソースを参照

[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.
pull/4742/head
sleeptightAnsiC 8ヶ月前
committed by GitHub
コミット
99dfec070a
この署名に対応する既知のキーがデータベースに存在しません GPGキーID: B5690EEEBB952194
1個のファイルの変更1行の追加1行の削除
  1. +1
    -1
      src/rtext.c

+ 1
- 1
src/rtext.c ファイルの表示

@ -1915,7 +1915,7 @@ void UnloadCodepoints(int *codepoints)
int GetCodepointCount(const char *text)
{
unsigned int length = 0;
t">char ">*n><span class="n">ptr o">= (char *p">)&text[0];
const char *n">ptr = text;
while (*ptr != '\0')
{

読み込み中…
キャンセル
保存