aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2017-01-25 19:38:55 -0500
committerPaul Gilbert2017-01-25 19:38:55 -0500
commit95864c83487ba22cc8e63d8529c575de513e6ecf (patch)
tree14fa0928932bf84763b7a17e0fcafc9cb604037d /engines
parent66fd5eef7c6376b55167f417cecdab5233e5fa53 (diff)
downloadscummvm-rg350-95864c83487ba22cc8e63d8529c575de513e6ecf.tar.gz
scummvm-rg350-95864c83487ba22cc8e63d8529c575de513e6ecf.tar.bz2
scummvm-rg350-95864c83487ba22cc8e63d8529c575de513e6ecf.zip
TITANIC: Simplify TTconceptNode setConcept
Diffstat (limited to 'engines')
-rw-r--r--engines/titanic/true_talk/tt_concept_node.cpp22
1 files changed, 2 insertions, 20 deletions
diff --git a/engines/titanic/true_talk/tt_concept_node.cpp b/engines/titanic/true_talk/tt_concept_node.cpp
index 5a791581ec..4573516a58 100644
--- a/engines/titanic/true_talk/tt_concept_node.cpp
+++ b/engines/titanic/true_talk/tt_concept_node.cpp
@@ -65,26 +65,8 @@ void TTconceptNode::deleteSiblings() {
}
TTconcept **TTconceptNode::setConcept(int conceptIndex, TTconcept *src) {
- TTconcept **conceptPP = &_concept0P;
- switch (conceptIndex) {
- case 1:
- conceptPP = &_concept1P;
- break;
- case 2:
- conceptPP = &_concept2P;
- break;
- case 3:
- conceptPP = &_concept3P;
- break;
- case 4:
- conceptPP = &_concept4P;
- break;
- case 5:
- conceptPP = &_concept5P;
- break;
- default:
- break;
- }
+ assert(conceptIndex >= 0 && conceptIndex <= 5);
+ TTconcept **conceptPP = &_concepts[conceptIndex];
if (src) {
bool isPronoun = false;