diff options
author | Nicola Bertoldi <bertoldi@fbk.eu> | 2014-04-28 21:18:38 +0400 |
---|---|---|
committer | Nicola Bertoldi <bertoldi@fbk.eu> | 2014-04-28 21:18:38 +0400 |
commit | 20381cbf8996ea46d32c470c8580a68eda4ec64e (patch) | |
tree | b925ad630058c7f642f20af534829ccac2decaa2 /moses/HypothesisStackCubePruning.cpp | |
parent | 03825e3ffdd1042ba02a64981ebb2e4c731ef153 (diff) | |
parent | 6182750b7077f226f2eb96a8b5b97be72d274c74 (diff) |
merged master into dynamic-models and solved conflicts
Diffstat (limited to 'moses/HypothesisStackCubePruning.cpp')
-rw-r--r-- | moses/HypothesisStackCubePruning.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/moses/HypothesisStackCubePruning.cpp b/moses/HypothesisStackCubePruning.cpp index 8cfaf7ffb..c39aa8641 100644 --- a/moses/HypothesisStackCubePruning.cpp +++ b/moses/HypothesisStackCubePruning.cpp @@ -153,6 +153,8 @@ void HypothesisStackCubePruning::AddInitial(Hypothesis *hypo) void HypothesisStackCubePruning::PruneToSize(size_t newSize) { + if ( newSize == 0) return; // no limit + if (m_hypos.size() > newSize) { // ok, if not over the limit priority_queue<float> bestScores; |