From f15676801ca706a4978f09417fa8f32097ad6e2f Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Wed, 24 Feb 2010 14:29:22 -0500 Subject: prevent assert bug --- decoder/kbest.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'decoder/kbest.h') diff --git a/decoder/kbest.h b/decoder/kbest.h index cd9b6c2b..fcd40fcd 100644 --- a/decoder/kbest.h +++ b/decoder/kbest.h @@ -188,7 +188,8 @@ namespace KBest { if (new_d) { cand->push_back(new_d); std::push_heap(cand->begin(), cand->end(), HeapCompare()); - assert(ds->insert(new_d).second); // insert into uniqueness set, sanity check + bool inserted = ds->insert(new_d).second; // insert into uniqueness set + assert(inserted); } } } -- cgit v1.2.3