[Scummvm-git-logs] scummvm master -> fe3eae346e67daa7e94098205636b6896e42f1c1
digitall
547637+digitall at users.noreply.github.com
Wed Oct 23 04:35:40 CEST 2019
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
fe3eae346e WAGE: Fix Missing Default Switch Cases
Commit: fe3eae346e67daa7e94098205636b6896e42f1c1
https://github.com/scummvm/scummvm/commit/fe3eae346e67daa7e94098205636b6896e42f1c1
Author: D G Turner (digitall at scummvm.org)
Date: 2019-10-23T03:31:46+01:00
Commit Message:
WAGE: Fix Missing Default Switch Cases
These are flagged by GCC if -Wswitch-default is enabled.
Changed paths:
engines/wage/combat.cpp
engines/wage/script.cpp
engines/wage/util.cpp
diff --git a/engines/wage/combat.cpp b/engines/wage/combat.cpp
index e8f0c8df..67e682f 100644
--- a/engines/wage/combat.cpp
+++ b/engines/wage/combat.cpp
@@ -349,10 +349,11 @@ void WageEngine::performMagic(Chr *attacker, Chr *victim, Obj *magicalObject) {
case Obj::HEALS_SPIRITUAL_DAMAGE:
case Obj::HEALS_PHYSICAL_AND_SPIRITUAL_DAMAGE:
performHealingMagic(attacker, magicalObject);
- return;
+ break;
+ default:
+ performAttack(attacker, victim, magicalObject);
+ break;
}
-
- performAttack(attacker, victim, magicalObject);
}
void WageEngine::performHealingMagic(Chr *chr, Obj *magicalObject) {
@@ -873,6 +874,8 @@ bool WageEngine::handleAttack(Obj *weapon) {
case Obj::HEALS_SPIRITUAL_DAMAGE:
performMagic(player, enemy, weapon);
return true;
+ default:
+ break;
}
}
if (enemy != NULL)
diff --git a/engines/wage/script.cpp b/engines/wage/script.cpp
index 558f493..3b20e96 100644
--- a/engines/wage/script.cpp
+++ b/engines/wage/script.cpp
@@ -621,8 +621,10 @@ void Script::skipBlock() {
case 0x8C: // SOUND
case 0x8E: // LET
case 0x95: // MENU
- while (_data->readByte() != 0xFD)
- ;
+ while (_data->readByte() != 0xFD);
+ break;
+ default:
+ break;
}
}
}
@@ -801,6 +803,8 @@ bool Script::compare(Operand *o1, Operand *o2, int comparator) {
_world->move(o1->_value.chr, o2->_value.scene);
_handled = true; // TODO: Is this correct?
break;
+ default:
+ break;
}
return false;
diff --git a/engines/wage/util.cpp b/engines/wage/util.cpp
index 74f2cf5..4f85612 100644
--- a/engines/wage/util.cpp
+++ b/engines/wage/util.cpp
@@ -84,6 +84,8 @@ const char *getIndefiniteArticle(const Common::String &word) {
case 'o': case 'O':
case 'u': case 'U':
return "an ";
+ default:
+ break;
}
return "a ";
}
More information about the Scummvm-git-logs
mailing list