aboutsummaryrefslogtreecommitdiff
path: root/graphics/larryScale_generator.js
diff options
context:
space:
mode:
authorD G Turner2019-12-11 05:37:23 +0000
committerD G Turner2019-12-11 05:37:23 +0000
commitcb06c44d279325a78b25a5ad31f9a2f998fb91c3 (patch)
tree452cd1afba5c553e3c029c4d134a53071e5cdce6 /graphics/larryScale_generator.js
parent2e91bf0eeabc539c21c205982efd06a52450ab63 (diff)
downloadscummvm-rg350-cb06c44d279325a78b25a5ad31f9a2f998fb91c3.tar.gz
scummvm-rg350-cb06c44d279325a78b25a5ad31f9a2f998fb91c3.tar.bz2
scummvm-rg350-cb06c44d279325a78b25a5ad31f9a2f998fb91c3.zip
GRAPHICS: Fix Missing Default Switch Cases in LarryScale
These are flagged by GCC if -Wswitch-default is enabled.
Diffstat (limited to 'graphics/larryScale_generator.js')
-rw-r--r--graphics/larryScale_generator.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/graphics/larryScale_generator.js b/graphics/larryScale_generator.js
index 8df7b01746..7f22421a93 100644
--- a/graphics/larryScale_generator.js
+++ b/graphics/larryScale_generator.js
@@ -159,8 +159,8 @@ function generateSwitchBlock(variableName, getCaseBody) {
const switchStatements = orderedPairs
.map(([body, matrixes]) => generateCaseBlock(matrixes, body))
.join('\n');
- const comment = '// Note: There is a case label for every possible value, so we don\'t need a default label.';
- return `${comment}\nswitch (${variableName}) {\n${switchStatements}\n}`;
+ const comment = '// Note: There is a case label for every possible value, so we don\'t need a default label, but one is added to avoid any compiler warnings.';
+ return `${comment}\nswitch (${variableName}) {\ndefault: ${switchStatements}\n}`;
}
const PixelType = {