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 <hieuhoang@gmail.com>2015-10-16 15:01:32 +0300
committerHieu Hoang <hieuhoang@gmail.com>2015-10-16 15:01:32 +0300
commit978b0bbcedb3ae449b417dc0fd45a739b5042131 (patch)
tree2c5207a1a9b9e9aff07bba4f9de4f02c15ce370e /moses/WordLattice.cpp
parent31338d2fa211046e595efc22177326e165204d36 (diff)
change InputFeature::Instance to return pointer, not ref. Strange segfault in OSX/clang
Diffstat (limited to 'moses/WordLattice.cpp')
-rw-r--r--moses/WordLattice.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/moses/WordLattice.cpp b/moses/WordLattice.cpp
index 7804c9a58..c68d182b0 100644
--- a/moses/WordLattice.cpp
+++ b/moses/WordLattice.cpp
@@ -12,7 +12,7 @@ namespace Moses
{
WordLattice::WordLattice() : ConfusionNet()
{
- UTIL_THROW_IF2(&InputFeature::Instance() == NULL,
+ UTIL_THROW_IF2(InputFeature::InstancePtr() == NULL,
"Input feature must be specified");
}
@@ -57,9 +57,9 @@ InitializeFromPCNDataType
const std::string& debug_line)
{
// const StaticData &staticData = StaticData::Instance();
- const InputFeature &inputFeature = InputFeature::Instance();
- size_t numInputScores = inputFeature.GetNumInputScores();
- size_t numRealWordCount = inputFeature.GetNumRealWordsInInput();
+ const InputFeature *inputFeature = InputFeature::InstancePtr();
+ size_t numInputScores = inputFeature->GetNumInputScores();
+ size_t numRealWordCount = inputFeature->GetNumRealWordsInInput();
size_t maxSizePhrase = StaticData::Instance().GetMaxPhraseLength();