aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/true_talk
diff options
context:
space:
mode:
authorPaul Gilbert2016-05-20 20:51:57 -0400
committerPaul Gilbert2016-07-15 19:13:39 -0400
commit1e35288fee100dd3ba5cac0a128cd2b6858381c1 (patch)
tree476c0407dd8b03b189a17d78b09d3627fa6e52f1 /engines/titanic/true_talk
parent2d83f5b13104fd173d7272bec63cb76d42c2153e (diff)
downloadscummvm-rg350-1e35288fee100dd3ba5cac0a128cd2b6858381c1.tar.gz
scummvm-rg350-1e35288fee100dd3ba5cac0a128cd2b6858381c1.tar.bz2
scummvm-rg350-1e35288fee100dd3ba5cac0a128cd2b6858381c1.zip
TITANIC: Change TTnode addNode to addToTail
Diffstat (limited to 'engines/titanic/true_talk')
-rw-r--r--engines/titanic/true_talk/tt_node.cpp2
-rw-r--r--engines/titanic/true_talk/tt_node.h9
-rw-r--r--engines/titanic/true_talk/tt_sentence.cpp4
-rw-r--r--engines/titanic/true_talk/tt_word.cpp4
4 files changed, 9 insertions, 10 deletions
diff --git a/engines/titanic/true_talk/tt_node.cpp b/engines/titanic/true_talk/tt_node.cpp
index c72dfd3e51..cbbb1dd756 100644
--- a/engines/titanic/true_talk/tt_node.cpp
+++ b/engines/titanic/true_talk/tt_node.cpp
@@ -32,7 +32,7 @@ TTnode::~TTnode() {
detach();
}
-void TTnode::addNode(TTnode *newNode) {
+void TTnode::addToTail(TTnode *newNode) {
TTnode *tail = getTail();
tail->_nextP = newNode;
newNode->_priorP = this;
diff --git a/engines/titanic/true_talk/tt_node.h b/engines/titanic/true_talk/tt_node.h
index 8faebae18f..36d44288fd 100644
--- a/engines/titanic/true_talk/tt_node.h
+++ b/engines/titanic/true_talk/tt_node.h
@@ -34,15 +34,14 @@ public:
virtual ~TTnode();
/**
- * Links the passed node to this node as a linked list
- */
- void addNode(TTnode *newNode);
-
- /**
* Adds a new node at the beginning of the linked list
*/
void addToHead(TTnode *newNode);
+ /**
+ * Links the passed node to this node as a linked list
+ */
+ void addToTail(TTnode *newNode);
/**
* Detaches a node from any predecessor and/or successor
diff --git a/engines/titanic/true_talk/tt_sentence.cpp b/engines/titanic/true_talk/tt_sentence.cpp
index ca808884d7..67e1a977ce 100644
--- a/engines/titanic/true_talk/tt_sentence.cpp
+++ b/engines/titanic/true_talk/tt_sentence.cpp
@@ -89,7 +89,7 @@ void TTsentence::copyFrom(const TTsentence &src) {
node = static_cast<TTsentenceNode *>(node->_nextP)) {
TTsentenceNode *newNode = new TTsentenceNode(node->_wordP);
if (_nodesP)
- _nodesP->addNode(newNode);
+ _nodesP->addToTail(newNode);
else
_nodesP = newNode;
}
@@ -102,7 +102,7 @@ int TTsentence::storeVocabHit(TTword *word) {
TTsentenceNode *node = new TTsentenceNode(word);
if (_nodesP) {
- _nodesP->addNode(node);
+ _nodesP->addToTail(node);
} else {
_nodesP = node;
}
diff --git a/engines/titanic/true_talk/tt_word.cpp b/engines/titanic/true_talk/tt_word.cpp
index c277b871a4..dc686b88b6 100644
--- a/engines/titanic/true_talk/tt_word.cpp
+++ b/engines/titanic/true_talk/tt_word.cpp
@@ -98,7 +98,7 @@ int TTword::readSyn(SimpleFile *file) {
if (_synP) {
// A synonym already exists, so add new one as a tail
// at the end of the linked list of synonyms
- _synP->addNode(synNode);
+ _synP->addToTail(synNode);
} else {
// Very first synonym, so set it
_synP = synNode;
@@ -128,7 +128,7 @@ int TTword::setSynStr(TTstring &str) {
void TTword::appendNode(TTsynonym *node) {
if (_synP)
- _synP->addNode(node);
+ _synP->addToTail(node);
else
_synP = node;
}