diff options
author | D G Turner | 2019-12-11 05:37:23 +0000 |
---|---|---|
committer | D G Turner | 2019-12-11 05:37:23 +0000 |
commit | cb06c44d279325a78b25a5ad31f9a2f998fb91c3 (patch) | |
tree | 452cd1afba5c553e3c029c4d134a53071e5cdce6 /graphics/larryScale_generator.js | |
parent | 2e91bf0eeabc539c21c205982efd06a52450ab63 (diff) | |
download | scummvm-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.js | 4 |
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 = { |