allow no best hypo

This commit is contained in:
Hieu Hoang 2013-09-18 15:57:59 +02:00
parent 24f1760c05
commit 692dc1c05f

View File

@ -126,13 +126,13 @@ const ChartHypothesis *ChartCell::GetBestHypothesis() const
MapType::const_iterator iter;
for (iter = m_hypoColl.begin(); iter != m_hypoColl.end(); ++iter) {
const HypoList &sortedList = iter->second.GetSortedHypotheses();
CHECK(sortedList.size() > 0);
const ChartHypothesis *hypo = sortedList[0];
if (hypo->GetTotalScore() > bestScore) {
bestScore = hypo->GetTotalScore();
ret = hypo;
};
if (sortedList.size() > 0) {
const ChartHypothesis *hypo = sortedList[0];
if (hypo->GetTotalScore() > bestScore) {
bestScore = hypo->GetTotalScore();
ret = hypo;
}
}
}
return ret;