diff options
author | Ulrich Germann <Ulrich.Germann@gmail.com> | 2015-12-10 02:05:00 +0300 |
---|---|---|
committer | Ulrich Germann <Ulrich.Germann@gmail.com> | 2015-12-10 02:05:00 +0300 |
commit | 240b88c6834c9c94e8a6448a34dc4ad33bdf3fbd (patch) | |
tree | e9f43dba3717e8a430557c16a1d6543a13628ddf /moses/MockHypothesis.cpp | |
parent | ad5e27ae56298564dfd73637c160a682b5f5f028 (diff) |
Passing around AllOptions or references thereto everywhere,
strong them locally where appropriate, so that compontents can
become independent of StaticData once instantiated.
Diffstat (limited to 'moses/MockHypothesis.cpp')
-rw-r--r-- | moses/MockHypothesis.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/moses/MockHypothesis.cpp b/moses/MockHypothesis.cpp index 25f319ea1..4e7503eaa 100644 --- a/moses/MockHypothesis.cpp +++ b/moses/MockHypothesis.cpp @@ -39,8 +39,8 @@ MockHypothesisGuard { BOOST_CHECK_EQUAL(alignments.size(), targetSegments.size()); std::vector<Moses::FactorType> factors(1,0); - AllOptions const& opts = StaticData::Instance().options(); - m_sentence.reset(new Sentence(0, sourceSentence, opts, &factors)); + AllOptions::ptr opts(new AllOptions(StaticData::Instance().options())); + m_sentence.reset(new Sentence(opts,0, sourceSentence, &factors)); m_ttask = TranslationTask::create(m_sentence); m_manager.reset(new Manager(m_ttask)); |