From 07fc74cff4d6125f2b55e07b27b7ab43957d4215 Mon Sep 17 00:00:00 2001 From: Patryk Obara Date: Mon, 4 Nov 2019 05:41:47 +0100 Subject: [PATCH] Silence 12 switch warnings Author's intention was sufficiently explained in the comment in this case. --- src/ints/int10_modes.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/ints/int10_modes.cpp b/src/ints/int10_modes.cpp index 0294db01..a06beb62 100644 --- a/src/ints/int10_modes.cpp +++ b/src/ints/int10_modes.cpp @@ -1484,20 +1484,22 @@ Bitu VideoModeMemSize(Bitu mode) { i++; } if (!vmodeBlock) - return 0; + return 0; switch(vmodeBlock->type) { case M_LIN4: return vmodeBlock->swidth*vmodeBlock->sheight/2; case M_LIN8: return vmodeBlock->swidth*vmodeBlock->sheight; - case M_LIN15: case M_LIN16: + case M_LIN15: + case M_LIN16: return vmodeBlock->swidth*vmodeBlock->sheight*2; case M_LIN32: return vmodeBlock->swidth*vmodeBlock->sheight*4; case M_TEXT: return vmodeBlock->twidth*vmodeBlock->theight*2; + default: + // Return 0 for all other types, those always fit in memory + return 0; } - // Return 0 for all other types, those always fit in memory - return 0; }