aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorD G Turner2019-11-09 03:24:47 +0000
committerD G Turner2019-11-09 03:24:47 +0000
commit29aef74f6619e943b820497cb2a22175a8870804 (patch)
treea8bd34cd1d4b0bb30a4efae1f76c7b6fa888f8ff
parent5447a13013a91f9b0f4ddf26c7a56cdec71eb59b (diff)
downloadscummvm-rg350-29aef74f6619e943b820497cb2a22175a8870804.tar.gz
scummvm-rg350-29aef74f6619e943b820497cb2a22175a8870804.tar.bz2
scummvm-rg350-29aef74f6619e943b820497cb2a22175a8870804.zip
TOON: Fix Missing Default Switch Cases
These are flagged by GCC if -Wswitch-default is enabled.
-rw-r--r--engines/toon/picture.cpp2
-rw-r--r--engines/toon/toon.cpp16
2 files changed, 16 insertions, 2 deletions
diff --git a/engines/toon/picture.cpp b/engines/toon/picture.cpp
index 51077c0b17..4d9e45aacd 100644
--- a/engines/toon/picture.cpp
+++ b/engines/toon/picture.cpp
@@ -127,6 +127,8 @@ bool Picture::loadPicture(const Common::String &file) {
_height = TOON_SCREEN_HEIGHT;
return true;
}
+ default:
+ break;
}
return false;
}
diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp
index d0a4059402..46132a4fd2 100644
--- a/engines/toon/toon.cpp
+++ b/engines/toon/toon.cpp
@@ -1064,6 +1064,8 @@ bool ToonEngine::showMainmenu(bool &loadedGame) {
case MAINMENUHOTSPOT_HOTKEYSCLOSE:
menuMask = MAINMENUMASK_BASE;
continue;
+ default:
+ break;
}
if (musicPlaying) {
@@ -1098,6 +1100,8 @@ bool ToonEngine::showMainmenu(bool &loadedGame) {
exitGame = true;
doExit = true;
break;
+ default:
+ break;
}
}
@@ -2886,7 +2890,7 @@ int32 ToonEngine::runConversationCommand(int16 **command) {
}
break;
case 103:
- return result;
+ default:
break;
}
return result;
@@ -3972,7 +3976,6 @@ int32 ToonEngine::handleInventoryOnInventory(int32 itemDest, int32 itemSrc) {
break;
case 21:
switch (itemSrc) {
-
case 107:
characterTalk(1296);
replaceItemFromInventory(107, 109);
@@ -4001,6 +4004,8 @@ int32 ToonEngine::handleInventoryOnInventory(int32 itemDest, int32 itemSrc) {
setCursor(0, false, 0, 0);
rearrangeInventory();
return 1;
+ default:
+ break;
}
break;
case 22:
@@ -4316,6 +4321,8 @@ int32 ToonEngine::handleInventoryOnInventory(int32 itemDest, int32 itemSrc) {
setCursor(0, false, 0, 0);
rearrangeInventory();
return 1;
+ default:
+ break;
}
break;
case 71:
@@ -4628,6 +4635,9 @@ int32 ToonEngine::handleInventoryOnInventory(int32 itemDest, int32 itemSrc) {
} else if (itemSrc == 0x59 || itemSrc == 0x52) {
characterTalk(1496);
}
+ break;
+ default:
+ break;
}
return 0;
}
@@ -4822,6 +4832,8 @@ int32 ToonEngine::handleInventoryOnDrew(int32 itemId) {
runEventScript(_mouseX, _mouseY, 2, 108, 0);
}
return 1;
+ default:
+ break;
}
return 0;
}