summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2020-11-24 17:42:52 +0100
committerBenBE <BenBE@geshi.org>2020-12-05 19:58:32 +0100
commitba1549f99b2da2cacd5fc00b61a30059695f215a (patch)
treee8a532525d8b76bc8f861e8e72fd8ff52b158772
parentf61e74a4afb12952e9be136729bbc0cb8e977868 (diff)
Resolve conversion from int to short
-rw-r--r--CRT.c12
1 files 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];

© 2014-2024 Faster IT GmbH | imprint | privacy policy