瀏覽代碼

Converting int to char

Fixes warning: narrowing conversion caused by trying to convert int to unsigned char
pull/4839/head
Aidon 3 週之前
committed by GitHub
父節點
當前提交
513753c394
沒有發現已知的金鑰在資料庫的簽署中 GPG Key ID: B5690EEEBB952194
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. +5
    -1
      examples/core/core_2d_camera.c

+ 5
- 1
examples/core/core_2d_camera.c 查看文件

@ -44,7 +44,11 @@ int main(void)
spacing += (int)buildings[i].width;
buildColors[i] = (Color){ GetRandomValue(200, 240), GetRandomValue(200, 240), GetRandomValue(200, 250), 255 };
buildColors[i] = (Color){
(unsigned char)GetRandomValue(200, 240),
(unsigned char)GetRandomValue(200, 240),
(unsigned char)GetRandomValue(200, 250),
255};
}
Camera2D camera = { 0 };

Loading…
取消
儲存