Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHieu Hoang <hieu@hoang.co.uk>2013-05-22 15:28:32 +0400
committerHieu Hoang <hieu@hoang.co.uk>2013-05-22 15:28:32 +0400
commitbce3b361700a5d7b0fbdeba466d9b372cd0fa3e0 (patch)
treec32edf0cd43a4d888a5b09f1aa8dc5e113f10cbc /moses/Phrase.cpp
parent369e3411f929585967dfd6602a5d35daa2bc4f2c (diff)
Make Phrase::CreateFromString() more efficient
Diffstat (limited to 'moses/Phrase.cpp')
-rw-r--r--moses/Phrase.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/moses/Phrase.cpp b/moses/Phrase.cpp
index d4418b97a..175801d75 100644
--- a/moses/Phrase.cpp
+++ b/moses/Phrase.cpp
@@ -156,7 +156,7 @@ void Phrase::CreateFromString(FactorDirection direction
,const std::vector<FactorType> &factorOrder
,const StringPiece &phraseString
,const StringPiece &factorDelimiter
- ,Word *lhs)
+ ,Word **lhs)
{
// parse
vector<StringPiece> annotatedWordVector;
@@ -181,8 +181,8 @@ void Phrase::CreateFromString(FactorDirection direction
// lhs
CHECK(lhs);
- lhs->CreateFromString(direction, factorOrder, annotatedWord.substr(1, annotatedWord.size() - 2), true);
- assert(lhs->IsNonTerminal());
+ (*lhs)->CreateFromString(direction, factorOrder, annotatedWord.substr(1, annotatedWord.size() - 2), true);
+ assert((*lhs)->IsNonTerminal());
}
else {
//CHECK(lhs == NULL);