mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-26 05:14:36 +03:00
strange assert failure when stack is empty
This commit is contained in:
parent
eed865bd35
commit
b917ac552f
@ -163,9 +163,14 @@ float ChartTranslationOptionList::GetBestScore(const ChartCellLabel *chartCell)
|
||||
{
|
||||
const HypoList *stack = chartCell->GetStack().cube;
|
||||
assert(stack);
|
||||
assert(!stack->empty());
|
||||
const ChartHypothesis &bestHypo = **(stack->begin());
|
||||
return bestHypo.GetTotalScore();
|
||||
//assert(!stack->empty());
|
||||
if (stack->empty()) {
|
||||
return 0;
|
||||
}
|
||||
else {
|
||||
const ChartHypothesis &bestHypo = **(stack->begin());
|
||||
return bestHypo.GetTotalScore();
|
||||
}
|
||||
}
|
||||
|
||||
void ChartTranslationOptionList::Evaluate(const InputType &input, const InputPath &inputPath)
|
||||
|
Loading…
Reference in New Issue
Block a user