diff options
author | Hieu Hoang <hieuhoang@gmail.com> | 2015-10-18 14:41:36 +0300 |
---|---|---|
committer | Hieu Hoang <hieuhoang@gmail.com> | 2015-10-18 14:41:36 +0300 |
commit | b7d947ebf69ea04c8cf4092f23a8689fd0f37b0e (patch) | |
tree | e4f77ef21e0374cd98dafe74ebb369ffffcb0770 /moses/ChartManager.cpp | |
parent | f2960786074fcb0e7f91bfeebf29a00898745e38 (diff) |
change dynamic to static cast
Diffstat (limited to 'moses/ChartManager.cpp')
-rw-r--r-- | moses/ChartManager.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/moses/ChartManager.cpp b/moses/ChartManager.cpp index 296fd9768..504cf605b 100644 --- a/moses/ChartManager.cpp +++ b/moses/ChartManager.cpp @@ -619,7 +619,7 @@ void ChartManager::OutputDetailedTranslationReport( const StaticData &staticData = StaticData::Instance(); if (staticData.IsDetailedAllTranslationReportingEnabled()) { - const Sentence &sentence = dynamic_cast<const Sentence &>(m_source); + const Sentence &sentence = static_cast<const Sentence &>(m_source); size_t nBestSize = staticData.options().nbest.nbest_size; std::vector<boost::shared_ptr<ChartKBestExtractor::Derivation> > nBestList; CalcNBest(nBestSize, nBestList, staticData.options().nbest.nbest_size); @@ -720,7 +720,7 @@ void ChartManager::OutputDetailedTreeFragmentsTranslationReport(OutputCollector std::ostringstream out; ApplicationContext applicationContext; - const Sentence &sentence = dynamic_cast<const Sentence &>(m_source); + const Sentence &sentence = static_cast<const Sentence &>(m_source); const size_t translationId = m_source.GetTranslationId(); OutputTreeFragmentsTranslationOptions(out, applicationContext, hypo, sentence, translationId); @@ -731,7 +731,7 @@ void ChartManager::OutputDetailedTreeFragmentsTranslationReport(OutputCollector const vector<const StatefulFeatureFunction*>& sff = StatefulFeatureFunction::GetStatefulFeatureFunctions(); for( size_t i=0; i<sff.size(); i++ ) { if (sff[i] == treeStructure) { - const TreeState* tree = dynamic_cast<const TreeState*>(hypo->GetFFState(i)); + const TreeState* tree = static_cast<const TreeState*>(hypo->GetFFState(i)); out << "Full Tree " << translationId << ": " << tree->GetTree()->GetString() << "\n"; break; } |