Преглед изворни кода

Converting int to char

Fixes warning: narrowing conversion caused by trying to convert int to unsigned char
pull/4839/head
Aidon пре 4 месеци
committed by GitHub
родитељ
комит
513753c394
No known key found for this signature in database 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…
Откажи
Сачувај