Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHieu Hoang <hieuhoang@gmail.com>2015-10-19 12:58:29 +0300
committerHieu Hoang <hieuhoang@gmail.com>2015-10-19 13:48:27 +0300
commitb9f216cc96fda35fad9983037f02100e611c55fc (patch)
tree473c6cb6cca70f385bbb0edc9eeb380c988508bb /moses/ChartHypothesisCollection.cpp
parentf7839c42d5cf2de17e86ec16df5e2f541ba53c75 (diff)
delete use of mempool in Hypos. Never used. Getting in the way of next refactoring
Diffstat (limited to 'moses/ChartHypothesisCollection.cpp')
-rw-r--r--moses/ChartHypothesisCollection.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/moses/ChartHypothesisCollection.cpp b/moses/ChartHypothesisCollection.cpp
index 745f6f4d2..068194287 100644
--- a/moses/ChartHypothesisCollection.cpp
+++ b/moses/ChartHypothesisCollection.cpp
@@ -48,7 +48,7 @@ ChartHypothesisCollection::~ChartHypothesisCollection()
HCType::iterator iter;
for (iter = m_hypos.begin() ; iter != m_hypos.end() ; ++iter) {
ChartHypothesis *hypo = *iter;
- ChartHypothesis::Delete(hypo);
+ delete hypo;
}
//RemoveAllInColl(m_hypos);
}
@@ -65,7 +65,7 @@ bool ChartHypothesisCollection::AddHypothesis(ChartHypothesis *hypo, ChartManage
if (hypo->GetTotalScore() == - std::numeric_limits<float>::infinity()) {
manager.GetSentenceStats().AddDiscarded();
VERBOSE(3,"discarded, -inf score" << std::endl);
- ChartHypothesis::Delete(hypo);
+ delete hypo;
return false;
}
@@ -73,7 +73,7 @@ bool ChartHypothesisCollection::AddHypothesis(ChartHypothesis *hypo, ChartManage
// really bad score. don't bother adding hypo into collection
manager.GetSentenceStats().AddDiscarded();
VERBOSE(3,"discarded, too bad for stack" << std::endl);
- ChartHypothesis::Delete(hypo);
+ delete hypo;
return false;
}
@@ -118,7 +118,7 @@ bool ChartHypothesisCollection::AddHypothesis(ChartHypothesis *hypo, ChartManage
if (m_nBestIsEnabled) {
hypoExisting->AddArc(hypo);
} else {
- ChartHypothesis::Delete(hypo);
+ delete hypo;
}
return false;
}
@@ -168,7 +168,7 @@ void ChartHypothesisCollection::Remove(const HCType::iterator &iter)
{
ChartHypothesis *h = *iter;
Detach(iter);
- ChartHypothesis::Delete(h);
+ delete h;
}
/** prune number of hypo to a particular number of hypos, specified by m_maxHypoStackSize, according to score