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
path: root/search
diff options
context:
space:
mode:
authorKenneth Heafield <github@kheafield.com>2012-10-19 00:41:44 +0400
committerKenneth Heafield <github@kheafield.com>2012-10-19 00:41:44 +0400
commit5ed7513e0d4e4389905984fe0e1d9d2f38f9c50d (patch)
tree8448aad2b993945a65c038df0a1eb09aa5e3c5a8 /search
parent36373bfd5b1aaea970df4cd66e81d923d9761a86 (diff)
D'oh correct return value for existing entries
Diffstat (limited to 'search')
-rw-r--r--search/vertex_generator.hh2
1 files changed, 1 insertions, 1 deletions
diff --git a/search/vertex_generator.hh b/search/vertex_generator.hh
index 8122aaa5f..60e86112a 100644
--- a/search/vertex_generator.hh
+++ b/search/vertex_generator.hh
@@ -24,7 +24,7 @@ class VertexGenerator {
void NewHypothesis(PartialEdge partial) {
const lm::ngram::ChartState &state = partial.CompletedState();
std::pair<Existing::iterator, bool> ret(existing_.insert(std::make_pair(hash_value(state), partial)));
- if (ret.second && ret.first->second < partial) {
+ if (!ret.second && ret.first->second < partial) {
ret.first->second = partial;
}
}