Fix narrowing warnings (errors on clang/freebsd) and an unhandled value in switch. (Part of patch #275 from strageqargo)
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4072
This commit is contained in:
parent
aa8bf6041e
commit
f7ae7a1dbe
2 changed files with 6 additions and 4 deletions
|
@ -280,9 +280,9 @@ static void update_cga16_color(void) {
|
|||
}
|
||||
Bitu CGApal[4] = {
|
||||
overscan,
|
||||
2 + (color_sel||bw ? 1 : 0) + (background_i ? 8 : 0),
|
||||
4 + (color_sel&&!bw? 1 : 0) + (background_i ? 8 : 0),
|
||||
6 + (color_sel||bw ? 1 : 0) + (background_i ? 8 : 0)
|
||||
static_cast<Bitu>(2 + (color_sel||bw ? 1 : 0) + (background_i ? 8 : 0)),
|
||||
static_cast<Bitu>(4 + (color_sel&&!bw? 1 : 0) + (background_i ? 8 : 0)),
|
||||
static_cast<Bitu>(6 + (color_sel||bw ? 1 : 0) + (background_i ? 8 : 0))
|
||||
};
|
||||
for (Bit8u x=0; x<4; x++) { // Position of pixel in question
|
||||
bool even = (x & 1) == 0;
|
||||
|
@ -381,6 +381,8 @@ static void write_cga_color_select(Bitu val) {
|
|||
vga.tandy.border_color = val & 0xf;
|
||||
vga.attr.overscan_color = 0;
|
||||
break;
|
||||
default: //Else unhandled values warning
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue