aboutsummaryrefslogtreecommitdiff
path: root/engines/glk/alan3/instance.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2019-07-06 16:14:54 -0700
committerPaul Gilbert2019-07-06 16:14:54 -0700
commitf282fbb49bf941c5b8ac1a2dd0b26a4a63978060 (patch)
tree3f1766cae5f5b4d8f00aa56938eff1e541eab4ca /engines/glk/alan3/instance.cpp
parent54b838cd6077e07f16e24d82cd9b7636f5a5b55d (diff)
downloadscummvm-rg350-f282fbb49bf941c5b8ac1a2dd0b26a4a63978060.tar.gz
scummvm-rg350-f282fbb49bf941c5b8ac1a2dd0b26a4a63978060.tar.bz2
scummvm-rg350-f282fbb49bf941c5b8ac1a2dd0b26a4a63978060.zip
GLK: ALAN3: Fix gcc errors
Diffstat (limited to 'engines/glk/alan3/instance.cpp')
-rw-r--r--engines/glk/alan3/instance.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/engines/glk/alan3/instance.cpp b/engines/glk/alan3/instance.cpp
index b738fd6a83..e1fab8d78a 100644
--- a/engines/glk/alan3/instance.cpp
+++ b/engines/glk/alan3/instance.cpp
@@ -289,10 +289,13 @@ bool isAt(int instance, int other, ATrans trans) {
switch (trans) {
case DIRECT:
return admin[instance].location == other;
+
case INDIRECT:
if (curr == other)
return FALSE;
curr = admin[curr].location;
+ // fall through
+
case TRANSITIVE:
while (curr != 0) {
if (curr == other)
@@ -302,6 +305,7 @@ bool isAt(int instance, int other, ATrans trans) {
}
return FALSE;
}
+
syserr("Unexpected value in switch in isAt() for location");
return FALSE;
} else if (isALocation(other)) {
@@ -309,11 +313,10 @@ bool isAt(int instance, int other, ATrans trans) {
switch (trans) {
case DIRECT:
return admin[instance].location == other;
- case INDIRECT: {
+ case INDIRECT:
if (admin[instance].location == other)
return FALSE; /* Directly, so not Indirectly */
- /* Fall through to transitive handling of the location */
- }
+ // fall through
case TRANSITIVE: {
int location = locationOf(instance);
int curr = other;