Use GetId instead of pointers in log

This commit is contained in:
Kenneth Heafield 2011-11-12 18:31:56 +00:00
parent 953f2200ff
commit ce90c8716b

View File

@ -257,13 +257,13 @@ TO_STRING_BODY(ChartHypothesis)
std::ostream& operator<<(std::ostream& out, const ChartHypothesis& hypo)
{
out << &hypo;
out << hypo.GetId();
// recombination
if (hypo.GetWinningHypothesis() != NULL &&
hypo.GetWinningHypothesis() != &hypo)
{
out << "->" << hypo.GetWinningHypothesis();
out << "->" << hypo.GetWinningHypothesis()->GetId();
}
out << " " << hypo.GetCurrTargetPhrase()
@ -273,7 +273,7 @@ std::ostream& operator<<(std::ostream& out, const ChartHypothesis& hypo)
HypoList::const_iterator iter;
for (iter = hypo.GetPrevHypos().begin(); iter != hypo.GetPrevHypos().end(); ++iter) {
const ChartHypothesis &prevHypo = **iter;
out << " " << &prevHypo;
out << " " << prevHypo.GetId();
}
out << " [total=" << hypo.GetTotalScore() << "]";