From ba1549f99b2da2cacd5fc00b61a30059695f215a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Tue, 24 Nov 2020 17:42:52 +0100 Subject: Resolve conversion from int to short --- CRT.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/CRT.c b/CRT.c index b5429475..6c8f0b31 100644 --- a/CRT.c +++ b/CRT.c @@ -789,10 +789,10 @@ void CRT_enableDelay() { void CRT_setColors(int colorScheme) { CRT_colorScheme = colorScheme; - for (int i = 0; i < 8; i++) { - for (int j = 0; j < 8; j++) { + for (short int i = 0; i < 8; i++) { + for (short int j = 0; j < 8; j++) { if (ColorIndex(i, j) != ColorIndexGrayBlack) { - int bg = (colorScheme != COLORSCHEME_BLACKNIGHT) + short int bg = (colorScheme != COLORSCHEME_BLACKNIGHT) ? (j == 0 ? -1 : j) : j; init_pair(ColorIndex(i, j), i, bg); @@ -800,10 +800,8 @@ void CRT_setColors(int colorScheme) { } } - int grayBlackFg = COLORS > 8 ? 8 : 0; - int grayBlackBg = (colorScheme != COLORSCHEME_BLACKNIGHT) - ? -1 - : 0; + short int grayBlackFg = COLORS > 8 ? 8 : 0; + short int grayBlackBg = (colorScheme != COLORSCHEME_BLACKNIGHT) ? -1 : 0; init_pair(ColorIndexGrayBlack, grayBlackFg, grayBlackBg); CRT_colors = CRT_colorSchemes[colorScheme]; -- cgit v1.2.3